Skip to content

Commit

Permalink
document workflow for local plugin development
Browse files Browse the repository at this point in the history
Fixes #316

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
  • Loading branch information
TomasTomecek committed Mar 23, 2018
1 parent debcde0 commit a34a3f8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,43 @@ passing `async=True`.
You need to run `:UpdateRemotePlugins` in nvim for changes in the specifications
to have effect. For details see `:help remote-plugin` in nvim.

If you are working on your plugin locally, it may be desirable to run the
plugin from a git repository directly without the need of installing or
symlinking it.
The easiest way to do this is to create a dedicated vimrc file just for sake of
development of your plugin. If you are in a root of the git repo with the
plugin, consider creating this vimrc file:
```
$ cat vimrc
let &runtimepath.=','.escape(expand('<sfile>:p:h'), '\,')
```

It will append your current work directory to the runtime path so neovim is
able to find and load your plugin.

Then just run command `:UpdateRemotePlugins` and your plugin should be up and
running.

In case you run into some issues, you can list loaded plugins:
```
:scriptnames
1: ~/path/tp/your/plugin-git-repo/vimrc
2: /usr/share/nvim/runtime/filetype.vim
3: /usr/share/nvim/runtime/ftplugin.vim
4: /usr/share/nvim/runtime/indent.vim
<trimmed for clarity>
25: /usr/share/nvim/runtime/plugin/zipPlugin.vim
26: ~/path/tp/your/plugin-git-repo/plugin/lucid.vim
```

You can also inspect the `runtimepath` like this:
```
:set runtimepath
runtimepath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site, <snip>
,~/g/path/to/your/plugin-git-repo
```


#### Development

If you change the code, you need to run
Expand Down

0 comments on commit a34a3f8

Please sign in to comment.