diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-05-03 11:10:36 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2020-05-03 11:10:36 +0200 |
| commit | a33bccaaf0c69146dfe330feb52e05c975054468 (patch) | |
| tree | 593390eedb3dd2218a2a143e8d5dbcd566780664 | |
| parent | Add 'nvim-treesitter/node-movement' (diff) | |
| download | nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.tar nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.tar.gz nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.tar.bz2 nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.tar.lz nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.tar.xz nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.tar.zst nvim-treesitter-a33bccaaf0c69146dfe330feb52e05c975054468.zip | |
Add documentation for `node_movement`, rename: `textobj` -> `incremental_selection`
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | doc/nvim-treesitter.txt | 36 |
2 files changed, 35 insertions, 14 deletions
@@ -92,7 +92,7 @@ require'nvim-treesitter.configs'.setup { enable = true, -- false will disable the whole extension disable = { 'c', 'rust' }, -- list of language that will be disabled }, - textobj = { -- this enables incremental selection + incremental_selection = { -- this enables incremental selection enable = true, disable = { 'cpp', 'lua' }, keymaps = { -- mappings for incremental selection (visual mappings) @@ -100,6 +100,16 @@ require'nvim-treesitter.configs'.setup { scope_incremental = "<leader>f" -- "grc" by default } }, + node_movement = { -- this cursor movement in node hierachy + enable = true, + disable = { 'cpp', 'rust' }, + keymaps = { -- mappings for node movement (normal mappings) + move_up = "<a-k>", -- default is to move with alt key hold + move_down = "<a-j>", + move_left = "<a-h>", + move_right = "<a-l>", + } + }, ensure_installed = 'all' -- one of 'all', 'language', or a list of languages } EOF @@ -124,6 +134,7 @@ Some of these features are : - [x] Incremental selection - [ ] Syntax based code folding - [x] Consistent syntax highlighting (the api is not quite stable yet) + - [x] Cursor movement in node hierachy You can find the roadmap [here](https://github.com/nvim-treesitter/nvim-treesitter/projects/1). The roadmap and all features of this plugin are open to change, and any suggestion will be highly appreciated! diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index 55ada1596..ceb834be1 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -30,19 +30,29 @@ By default, everything is disabled. To enable support for features, in your `ini > lua <<EOF require'nvim-treesitter.configs'.setup { - highlight = { - 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, - disable = { 'cpp', 'lua' }, - keymaps = { -- mappings for visual selection - 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' ... } + highlight = { + enable = true, -- false will disable the whole extension + disable = { 'c', 'rust' }, -- list of language that will be disabled + }, + incremental_selection = { -- this enables incremental selection + enable = true, + disable = { 'cpp', 'lua' }, + keymaps = { -- mappings for incremental selection (visual mappings) + node_incremental = "<leader>e", -- "grn" by default, + scope_incremental = "<leader>f" -- "grc" by default + } + }, + node_movement = { -- this cursor movement in node hierachy + enable = true, + disable = { 'cpp', 'rust' }, + keymaps = { -- mappings for node movement (normal mappings) + move_up = "<a-k>", -- default is to move with alt key hold + move_down = "<a-j>", + move_left = "<a-h>", + move_right = "<a-l>", + } + }, + ensure_installed = 'all' -- one of 'all', 'language', or a list of languages } < |
