diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2020-07-04 17:15:04 +0200 |
|---|---|---|
| committer | Thomas Vigouroux <39092278+vigoux@users.noreply.github.com> | 2020-07-14 22:34:43 +0200 |
| commit | d351c9b342141b9e455740bd0e371a02a3d4470a (patch) | |
| tree | 8b6637c0471d38993642753ff8bd484ec6b6dafa /doc | |
| parent | Add C/C++ textobjects (diff) | |
| download | nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.tar nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.tar.gz nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.tar.bz2 nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.tar.lz nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.tar.xz nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.tar.zst nvim-treesitter-d351c9b342141b9e455740bd0e371a02a3d4470a.zip | |
Update documentation for new modules 'refactor'/'textobjects'
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/nvim-treesitter.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index 5b619f8c4..3b08e662b 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -47,6 +47,48 @@ By default, everything is disabled. To enable support for features, in your `ini node_decremental = "grm", -- decrement to the previous node } }, + refactor = { + highlight_defintions = { + enable = true + }, + smart_rename = { + enable = true, + smart_rename = "grr" -- mapping to rename reference under cursor + }, + navigation = { + enable = true, + goto_definition = "gnd", -- mapping to go to definition of symbol under cursor + list_definitions = "gnD" -- mapping to list all definitions in current file + } + }, + textobjects = { -- syntax-aware textobjects + enable = true, + 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" + }, + -- or you use the queries from supported languages with textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["aC"] = "@class.outer", + ["iC"] = "@class.inner", + ["ac"] = "@conditional.outer", + ["ic"] = "@conditional.inner", + ["ae"] = "@block.outer", + ["ie"] = "@block.inner", + ["al"] = "@loop.outer", + ["il"] = "@loop.inner", + ["is"] = "@statement.inner", + ["as"] = "@statement.outer", + ["ad"] = "@comment.outer", + ["am"] = "@call.outer", + ["im"] = "@call.inner" + } + }, ensure_installed = 'all' -- one of 'all', 'language', or a list of languages } EOF |
