mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 08:50:11 -04:00
Fix documentation after #35
This commit is contained in:
parent
0207836eb2
commit
b28bc0defa
2 changed files with 28 additions and 24 deletions
26
README.md
26
README.md
|
|
@ -88,18 +88,20 @@ in your `init.vim`:
|
||||||
```lua
|
```lua
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
highlight = {
|
modules = {
|
||||||
enable = true, -- false will disable the whole extension
|
highlight = {
|
||||||
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
enable = true, -- false will disable the whole extension
|
||||||
},
|
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
||||||
textobj = { -- this enables incremental selection
|
},
|
||||||
enable = true,
|
textobj = { -- this enables incremental selection
|
||||||
disable = { 'cpp', 'lua' },
|
enable = true,
|
||||||
keymaps = { -- mappings for incremental selection (visual mappings)
|
disable = { 'cpp', 'lua' },
|
||||||
node_incremental = "<leader>e", -- "grn" by default,
|
keymaps = { -- mappings for incremental selection (visual mappings)
|
||||||
scope_incremental = "<leader>f" -- "grc" by default
|
node_incremental = "<leader>e", -- "grn" by default,
|
||||||
}
|
scope_incremental = "<leader>f" -- "grc" by default
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
ensure_installed = 'all' -- one of 'all', 'language', or a list of languages
|
ensure_installed = 'all' -- one of 'all', 'language', or a list of languages
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,20 @@ By default, everything is disabled. To enable support for features, in your `ini
|
||||||
>
|
>
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
highlight = {
|
modules = {
|
||||||
enable = true, -- false will disable the whole extension
|
highlight = {
|
||||||
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
enable = true, -- false will disable the whole extension
|
||||||
},
|
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
||||||
textobj = { -- this enables incremental selection
|
},
|
||||||
enable = true,
|
textobj = { -- this enables incremental selection
|
||||||
disable = { 'cpp', 'lua' },
|
enable = true,
|
||||||
keymaps = { -- mappings for visual selection
|
disable = { 'cpp', 'lua' },
|
||||||
node_incremental = "<leader>e", -- "grn" by default,
|
keymaps = { -- mappings for visual selection
|
||||||
scope_incremental = "<leader>f" -- "grc" by default
|
node_incremental = "<leader>e", -- "grn" by default,
|
||||||
}
|
scope_incremental = "<leader>f" -- "grc" by default
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
ensure_installed = 'all' -- can be one of 'all', 'language' or {'language1', 'language2' ... }
|
ensure_installed = 'all' -- can be one of 'all', 'language' or {'language1', 'language2' ... }
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue