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:
Santos Gallegos 2020-07-27 20:59:51 -05:00 committed by Thomas Vigouroux
parent b1da6ad8b3
commit 5202b7b098
2 changed files with 68 additions and 88 deletions

View file

@ -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
<