-
Notifications
You must be signed in to change notification settings - Fork 298
Plugins
Oni does not require the use of a plugin-manager such as pathogen or vundle (although you may use one if you wish, and this will be necessary if you are sharing a configuration between Neovim and Oni). Oni will attempt to load all plugins found in the $HOME/.oni/plugins
directory.
To install a Vim plugin, you just need to create a directory inside $HOME/.oni/plugins
.
git clone
will usually do this for you, so for example, if you wanted to install this Solarized Theme by lifepillar, you'd run:
NOTE: On Windows, use your home directory (ie,
C:/users/<your username
) instead of~
cd ~/.oni
mkdir -p plugins
cd plugins
git clone https://github.com/lifepillar/vim-solarized8
This will clone the vim-solarized8
plugin and create an ~/.oni/plugins/vim-solarized8
folder.
Restart Oni, and execute :colorscheme solarized8_light
, and enjoy your new theme!
Several plugins are included with Oni:
As well as some color-schemes:
NOTE: You can disable these by setting the
oni.useDefaultConfig
configuration value tofalse
. See Configuration for details.
Installing an Oni plugin is much the same as installing a Vim plugin. However, because they potentially have JavaScript extension code in addition to VimL, you often need to install NPM dependencies.
Oni currently has the following plugins:
Prerequisite: Make sure the
npm
command is available. If not, install the latest node
As above, you just need to create a folder hosting the plugin, and install the dependencies. As an example, here's how you'd install the oni-plugin-tslint extension.
cd ~/.oni
mkdir -p plugins
cd plugins
git clone https://github.com/extr0py/oni-plugin-tslint
cd oni-plugin-tslint
npm install
Restart Oni, and linting should now be enabled when you open up a TypeScript (.ts
) file.
Oni offers several rich extensibility points, with the focus being on various UI integrations as well as IDE-like capabilities.
NOTE: The API will be in-flux until v1.0.
Language extenders given ONI rich integration with languages, offering services like:
- Code Completion
- Quick Info
- Goto Definition
- Formatting
- Live code evaluation
- Unit test integration
- Enhanced syntax highlighting
To see the in-progress API, check out the Oni.d.ts definition file as well as the typescript language plugin, which demonstrates several of these features:
You can explore the Oni API during runtime by doing the following:
- Press
<C-P>
(open Command Palette) - Select "Open Dev Tools"
- You can access the Oni object directly, ie: