添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
$cd .local/share/nvim/site/pack/my_plugins/start/
xxx@xx:~/.local/share/nvim/site/pack/my_plugins/start $ ls
formatter.nvim nvim-lspconfig nvim-comment
Unfortunately, on its main website page of neovim the documentation link(*) results in a 404 but, there is documentation on its website.
Apart from a global plugin (automatically loaded) there is the filetype plugin: Adding a plugin -> FILETYPE PLUGINS . Various options for those in UNIX-like systems are:
  • ~/.local/share/nvim/site/ftplugin/<filetype>.vim
  • ~/.local/share/nvim/site/ftplugin/<filetype>_<name>.vim
  • ~/.local/share/nvim/site/ftplugin/<filetype>/<name>.vim
  • Located at ~/.local/share/nvim/site/pack/<package-name> are packages: Adding a package
    I think you want the automatically loaded global plugin Adding a plugin -> USING A GLOBAL PLUGIN facility:
    First read the text in the plugin itself to check for any special conditions.
    Then copy the file to your plugin directory:
        system        plugin directory
        Unix        ~/.local/share/nvim/site/plugin
    [...]
    Instead of putting plugins directly into the plugin/ directory, you may
    better organize them by putting them into subdirectories under plugin/.
    As an example, consider using "~/.local/share/nvim/site/plugin/perl/*.vim" for
    all your Perl plugins.
    I do not know if there is one command that shows all plugins, i.e. lists global plugins, filetype plugins and perhaps even packages; best option seems to inspect all relevant directories.
    As mentioned in the release documentation of Neovim v0.5.0 here , it seems there has been a substantial growth in plugins/packages for neovim. Several plugin/package managers exist; this may also help: How to set up Neovim 0.5 + Modern plugins (LSP, Treesitter, Fuzzy finder, etc)
    (*) Edit: the documentation link should probably be: https://neovim.io/doc/general/
    ~/.local/share/nvim/site/autoload/plug.vim
    ~/.local/share/nvim/site/pack/plugins/start/plug.vim
    ~/.local/share/nvim/site/plugin/plug.vim
    I tested it with running  nvim and calling
    Both yielding an error message that these are not valid editor commands.
    It's really frustrating!
    Any help?
    :source ~/.config/nvim/init.vim
    take into account which configuration file you use for your nvim installation and then try :PlugInstall
    However, if plug.vim is put at the right place it should get autoloaded when nvim is started.
    For plug.vim to work you need three things:
  • plug.vim in a place where it will be autoloaded, for example ~/.local/share/nvim/site/autoload/plug.vim
  • in your configuration file, for example: ~/.config/nvim/init.vim, you need some code that will install plugins in a certain directory, like ~/.local/share/nvim/plugged/
  • specify the plugins you want to install inside the code mentioned at #2
  • With a clean install of nvim, I followed the instructions for the steps #1-3 as mentioned in the vim-plug Tutorial. You could make some changes to the directories named there but, try those mentioned there first. Following the instructions of the tutorial :PlugInstall, :PlugStatus and :PlugUpdate are all functional.
    :source ~/.config/nvim/init.vim
    take into account which configuration file you use for your nvim installation and then try :PlugInstall
    However, if plug.vim is put at the right place it should get autoloaded when nvim is started.
    For plug.vim to work you need three things:
  • plug.vim in a place where it will be autoloaded, for example ~/.local/share/nvim/site/autoload/plug.vim
  • in your configuration file, for example: ~/.config/nvim/init.vim, you need some code that will install plugins in a certain directory, like ~/.local/share/nvim/plugged/
  • specify the plugins you want to install inside the code mentioned at #2
  • With a clean install of nvim, I followed the instructions for the steps #1-3 as mentioned in the vim-plug Tutorial. You could make some changes to the directories named there but, try those mentioned there first. Following the instructions of the tutorial :PlugInstall, :PlugStatus and :PlugUpdate are all functional. Thank you! It finally worked: It did not suffice to put plug.vim into the appropriate directory, there has to be the basic plugin initialization code in init.vim (as you point out in step 2.) Otherwise nvim will not load the plugin altogether (some sort of lazy evaluation?) and :PlugStatus et al. won't work. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies. Accept Learn more…