mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
feat(languagetree): implement language tree
Allow the LanguageTree to be used as an option for highlighting. Co-authored-by: Santos Gallegos <stsewd@protonmail.com> Co-authored-by: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
This commit is contained in:
parent
e9b6e2d311
commit
f7d92f663c
5 changed files with 193 additions and 13 deletions
|
|
@ -104,7 +104,6 @@ All modules are disabled by default,
|
|||
so you'll need to activate them by putting this in your `init.vim` file:
|
||||
|
||||
```lua
|
||||
lua <<EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "all", -- one of "all", "language", or a list of languages
|
||||
highlight = {
|
||||
|
|
@ -112,7 +111,6 @@ require'nvim-treesitter.configs'.setup {
|
|||
disable = { "c", "rust" }, -- list of language that will be disabled
|
||||
},
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Check [`:h nvim-treesitter-modules`](doc/nvim-treesitter.txt)
|
||||
|
|
@ -125,7 +123,6 @@ for a list of available modules and its options.
|
|||
Consistent syntax highlighting.
|
||||
|
||||
```lua
|
||||
lua <<EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
|
@ -135,7 +132,6 @@ require'nvim-treesitter.configs'.setup {
|
|||
},
|
||||
},
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
## Incremental selection
|
||||
|
|
@ -143,7 +139,6 @@ EOF
|
|||
Incremental selection based on the named nodes from the grammar.
|
||||
|
||||
```lua
|
||||
lua <<EOF
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
|
|
@ -155,7 +150,6 @@ require'nvim-treesitter.configs'.setup {
|
|||
},
|
||||
},
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
# External modules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue