3

I am trying to make a plug in for vim-plug. At the moment I am not sure how to load a local directory. I have ran in my root directory:

mkdir vim-test
cd vim-test
git init
mkdir syntax

I then went into my ~/.config/nvim/init.vim file and I have:

" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')

Plug 'junegunn/vim-easy-align'
Plug 'scrooloose/nerdtree'
Plug 'cespare/vim-toml'
Plug '~/vim-test'

" Initialize plugin system
call plug#end()

Currently, all the other plug ins seem to load, but vim-test does not show up as a package when I execute :PlugInstall and from what I can tell, it doesn't install either. What am I supposed to do to make vim-test show up?

Dair
  • 15,910
  • 9
  • 62
  • 107
  • I *think* PlugInstall is for Github installation. Can you set the `runtime` path to your directory and see if it loads? Check `:help lua` for an example plugin code. – Nishant Feb 20 '18 at 06:15
  • @Nishant I am not sure exactly what you mean by `runtime` (I am pretty new to Vimscript. But, your first guess was correct (please see my answer for more details). Thanks! – Dair Feb 20 '18 at 06:32
  • Please check `:help lua` for an example. Setting `runtime` path to the top-level directory of your project with (i.e a directory with `autoload`, `plugin` etc) works. http://learnvimscriptthehardway.stevelosh.com/chapters/42.html is there for vim but should be similar for neovim. – Nishant Feb 20 '18 at 06:41

1 Answers1

4

As Nishant points out:

I think PlugInstall is for Github installation.

I was able to check the status with :PlugStatus and vim-test was in fact loaded with a status of OK. It just doesn't show up in :PlugInstall.

Dair
  • 15,910
  • 9
  • 62
  • 107