chore(modules): remove refactor module

This commit is contained in:
Steven Sojka 2020-09-16 07:03:22 -05:00 committed by Steven Sojka
parent 98c12ec23a
commit 82a8b859c6
8 changed files with 8 additions and 518 deletions

View file

@ -64,11 +64,6 @@ Each module corresponds to an entry in the dictionary passed to the
-- Modules and its options go here
highlight = { enable = true },
incremental_selection = { enable = true },
refactor = {
highlight_definitions = { enable = true },
smart_rename = { enable = true },
navigation = { enable = true },
},
textobjects = { enable = true },
}
EOF
@ -159,124 +154,6 @@ Supported options:
}
EOF
<
------------------------------------------------------------------------------
REFACTOR *nvim-treesitter-refactor-mod*
*nvim-treesitter-highlight-definitions-submod*
Highlight definitions~
Highlights definition and usages of the current symbol under the cursor.
Query files: `locals.scm`.
Supported options:
- enable: `true` or `false`.
- disable: list of languages.
>
lua <<EOF
require'nvim-treesitter.configs'.setup {
refactor = {
highlight_definitions = { enable = true },
},
}
EOF
<
Note: this makes use of the |CursorHold| event, so the highlight is
triggered after 'updatetime'.
*nvim-treesitter-highlight-current-scope-submod*
Highlight current scope~
Highlights the block from the current scope where the cursor is.
Query files: `locals.scm`.
Supported options:
- enable: `true` or `false`.
- disable: list of languages.
>
lua <<EOF
require'nvim-treesitter.configs'.setup {
refactor = {
highlight_current_scope = { enable = true },
},
}
EOF
<
*nvim-treesitter-smart-rename-submod*
Smart rename~
Renames the symbol under the cursor within the current scope (and current file).
Query files: `locals.scm`.
Supported options:
- enable: `true` or `false`.
- disable: list of languages.
- keymaps:
- smart_rename: rename symbol under the cursor.
Defaults to `grr`.
>
lua <<EOF
require'nvim-treesitter.configs'.setup {
refactor = {
smart_rename = {
enable = true,
keymaps = {
smart_rename = "grr",
},
},
},
}
EOF
<
*nvim-treesitter-navigation-submod*
Navigation~
Provides "go to definition" for the symbol under the cursor,
and lists the definitions from the current file.
Query files: `locals.scm`.
Supported options:
- enable: `true` or `false`.
- disable: list of languages.
- keymaps:
- goto_definition: go to the definition of the symbol under the cursor.
Defaults to `gnd`.
- goto_definition_lsp_fallback: go to the definition of the symbol under
the cursor or use vim.lsp.buf.definition if the symbol can not be
resolved. You can use your own fallback function if create a mapping for
`lua require'nvim-treesitter.refactor.navigation(nil, fallback_function)<cr>` .
No default mapping
- list_definitions: list all definitions from the current file.
Defaults to `gnD`.
- goto_next_usage: go to next usage of identifier under the cursor.
Defaults to `<a-*>`.
- goto_previous_usage: go to previous usage of identifier.
Defaults to `<a-#>`.
>
lua <<EOF
require'nvim-treesitter.configs'.setup {
refactor = {
navigation = {
enable = true,
keymaps = {
goto_definition = "gnd",
list_definitions = "gnD",
goto_next_usage = "<a-*>",
goto_previous_usage = "<a-#>",
},
},
},
}
EOF
<
------------------------------------------------------------------------------
TEXT OBJECTS *nvim-treesitter-textobjects-mod*
@ -744,27 +621,6 @@ Any variable name that does not have another highlight.
*hl-TSVariableBuiltin*
Variable names that are defined by the languages, like `this` or `self`.
==============================================================================
MODULE-HIGHLIGHTS *nvim-treesitter-module-highlights*
Apart from the general purpose highlights in |nvim-treesitter-highlights|,
some submodules use their own highlight groups to visualize additional
information.
`TSDefinition`
*hl-TSDefinition*
Used by refactor.highlight_definitions to highlight the definition of the
symbol under the cursor.
`TSDefinitionUsage`
*hl-TSDefinitionUsage*
Used by refactor.highlight_definitions to highlight usages of the symbol under
the cursor.
`TSCurrentScope`
*hl-TSCurrentScope*
Used by refactor.highlight_current_scope to highlight the current scope.
==============================================================================
PERFORMANCE *nvim-treesitter-performance*