From 901ffe1a363f21c168eacf011dce4f905fd26d5f Mon Sep 17 00:00:00 2001 From: Duncan McDougall Date: Mon, 20 Jun 2022 21:50:07 +0100 Subject: Add support for custom parser install locations #2959 (#3031) --- doc/nvim-treesitter.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index 52553fb0e..e870ab352 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -39,6 +39,12 @@ To enable supported features, put this in your `init.lua` file: > require'nvim-treesitter.configs'.setup { + -- A directory to install the parsers into. + -- If this is excluded or nil parsers are installed + -- to either the package dir, or the "site" dir. + -- If a custom path is used (not nil) it must be added to the runtimepath. + parser_install_dir = "/some/path/to/store/parsers", + -- A list of parser names, or "all" ensure_installed = { "c", "lua", "rust" }, @@ -62,6 +68,7 @@ To enable supported features, put this in your `init.lua` file: additional_vim_regex_highlighting = false, }, } + vim.opt.runtimepath:append("/some/path/to/store/parsers") < See |nvim-treesitter-modules| for a list of all available modules and its options. -- cgit v1.2.3-70-g09d2