aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorΛlisue (Ali sue・ありすえ) <lambdalisue@gmail.com>2024-06-06 22:56:50 +0900
committerGitHub <noreply@github.com>2024-06-06 15:56:50 +0200
commit3a74b5831058d0daf8952a5b8c556c61b30a3f46 (patch)
tree55ec1590344abbc346ddeceb04b100a4137c5ed2 /README.md
parentbot(lockfile): update cmake, elixir, pymanifest, requirements, sql (diff)
downloadnvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.tar
nvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.tar.gz
nvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.tar.bz2
nvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.tar.lz
nvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.tar.xz
nvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.tar.zst
nvim-treesitter-3a74b5831058d0daf8952a5b8c556c61b30a3f46.zip
docs(readme): fix example of the parser install directory (#6737)
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 28b24faff..f3a860d31 100644
--- a/README.md
+++ b/README.md
@@ -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",