mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
docs(readme): document 'location' key
This commit is contained in:
parent
673fdccd21
commit
abcbe65b6e
1 changed files with 7 additions and 6 deletions
13
README.md
13
README.md
|
|
@ -131,15 +131,16 @@ If you have a parser that is not on the list of supported languages (either as a
|
||||||
3. Add the following snippet to your `init.lua`:
|
3. Add the following snippet to your `init.lua`:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local parser_config = require "nvim-treesitter.parsers".configs
|
local parser_config = require('nvim-treesitter.parsers').configs
|
||||||
parser_config.zimbu = {
|
parser_config.zimbu = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "~/projects/tree-sitter-zimbu", -- local path or git repo
|
url = '~/projects/tree-sitter-zimbu', -- local path or git repo
|
||||||
files = {"src/parser.c"}, -- note that some parsers also require src/scanner.c or src/scanner.cc
|
files = { 'src/parser.c' }, -- note that some parsers also require src/scanner.c or src/scanner.cc
|
||||||
-- optional entries:
|
-- optional entries:
|
||||||
branch = "develop", -- only needed if different from default branch
|
branch = 'develop', -- only needed if different from default branch
|
||||||
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
|
location= 'parser', -- only needed if the parser is in subdirectory of a "monorepo"
|
||||||
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
|
requires_generate_from_grammar = true, -- only needed if repo does not contain pre-generated src/parser.c
|
||||||
|
generate_requires_npm = true, -- only needed if parser has npm dependencies
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue