Pack
Nvim :help pages, generated from source using the tree-sitter-vimdoc parser.
Extending Nvim
Using Vim packages
be downloaded as an archive and unpacked in its own directory, so the files are not mixed with files of other plugins. be a git, mercurial, etc. repository, thus easy to update. contain multiple plugins that depend on each other. contain plugins that are automatically loaded on startup ("start" packages, located in "pack/*/start/*") and ones that are only loaded when needed with :packadd ("opt" packages, located in "pack/*/opt/*"). A Vim "package" is a directory that contains plugin s. Compared to normal plugins, a package can...
runtime-search-path
Nvim searches for 1. all paths in 'runtimepath' 2. all "pack/*/start/*" dirs Nvim searches for :runtime files in:
" List all runtime dirs and packages with Lua paths. :echo nvim_get_runtime_file("lua/", v:true) Using a package and loading automatically Note that the "pack/*/start/*" paths are not explicitly included in 'runtimepath' , so they will not be reported by ":set rtp" or "echo &rtp". Scripts can use nvim_list_runtime_paths() to list all used directories, and nvim_get_runtime_file() to query for specific files or sub-folders within the runtime path. Example:
% mkdir -p ~/.local/share/nvim/site/pack/foo % cd ~/.local/share/nvim/site/pack/foo % unzip /tmp/foopack.zip The directory name "foo" is arbitrary, you can pick anything you like. Let's assume your Nvim files are in "~/.local/share/nvim/site" and you want to add a package from a zip archive "/tmp/foopack.zip":The directory name "foo" is arbitrary, you can pick anything you like.
pack/foo/README.txt pack/foo/start/foobar/plugin/foo.vim pack/foo/start/foobar/syntax/some.vim pack/foo/opt/foodebug/plugin/debugger.vim On startup after processing your You would now have these files under ~/.local/share/nvim/site:On startup after processing your config , Nvim scans all directories in 'packpath' for plugins in "pack/*/start/*", then loads the plugins.
... continue reading