mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 13:30:01 -04:00
docs(readme): fix example of the parser install directory (#6737)
This commit is contained in:
parent
fc9ee79f64
commit
3a74b58310
1 changed files with 4 additions and 2 deletions
|
|
@ -548,11 +548,13 @@ If you want to install the parsers to a custom directory you can specify this
|
|||
directory with `parser_install_dir` option in that is passed to `setup`.
|
||||
`nvim-treesitter` will then install the parser files into this directory.
|
||||
|
||||
This directory must be writeable and must be explicitly added to the
|
||||
This directory must be writeable and must be explicitly prepended to the
|
||||
`runtimepath`. For example:
|
||||
|
||||
```lua
|
||||
vim.opt.runtimepath:append("/some/path/to/store/parsers")
|
||||
-- It MUST be at the beginning of runtimepath. Otherwise the parsers from Neovim itself
|
||||
-- is loaded that may not be compatible with the queries from the 'nvim-treesitter' plugin.
|
||||
vim.opt.runtimepath:prepend("/some/path/to/store/parsers")
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
parser_install_dir = "/some/path/to/store/parsers",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue