mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
Docs: rework readme
- Fix some typos - Remove some unnecessary text that was taking space - Use double quotes in lua examples (this seems to be the convention in the source code) - Sort list of languages so they are easy to find.
This commit is contained in:
parent
b1da6ad8b3
commit
5202b7b098
2 changed files with 68 additions and 88 deletions
|
|
@ -32,14 +32,14 @@ By default, everything is disabled. To enable support for features, in your `ini
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { 'c', 'rust' }, -- list of language that will be disabled
|
||||
disable = { "c", "rust" }, -- list of language that will be disabled
|
||||
custom_captures = { -- mapping of user defined captures to highlight groups
|
||||
-- ["foo.bar"] = "Identifier" -- highlight own capture @foo.bar with highlight group "Identifier", see :h nvim-treesitter-query-extensions
|
||||
},
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
disable = { 'cpp', 'lua' },
|
||||
disable = { "cpp", "lua" },
|
||||
keymaps = { -- mappings for incremental selection (visual mappings)
|
||||
init_selection = 'gnn', -- maps in normal mode to init the node/scope selection
|
||||
node_incremental = "grn", -- increment to the upper named parent
|
||||
|
|
@ -73,10 +73,10 @@ By default, everything is disabled. To enable support for features, in your `ini
|
|||
disable = {},
|
||||
keymaps = {
|
||||
["iL"] = { -- you can define your own textobjects directly here
|
||||
python = "(function_definition) @function",
|
||||
cpp = "(function_definition) @function",
|
||||
c = "(function_definition) @function",
|
||||
java = "(method_declaration) @function"
|
||||
python = "(function_definition) @function",
|
||||
cpp = "(function_definition) @function",
|
||||
c = "(function_definition) @function",
|
||||
java = "(method_declaration) @function"
|
||||
},
|
||||
-- or you use the queries from supported languages with textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
|
|
@ -96,7 +96,7 @@ By default, everything is disabled. To enable support for features, in your `ini
|
|||
["im"] = "@call.inner"
|
||||
}
|
||||
},
|
||||
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
|
||||
<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue