forked from nvim-treesitter/nvim-treesitter-refactor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvim-treesitter-refactor.lua
47 lines (44 loc) · 1.23 KB
/
nvim-treesitter-refactor.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
local M = {}
function M.init()
local queries = require "nvim-treesitter.query"
require("nvim-treesitter").define_modules {
refactor = {
highlight_definitions = {
module_path = "nvim-treesitter-refactor.highlight_definitions",
enable = false,
disable = {},
is_supported = queries.has_locals,
clear_on_cursor_move = true,
},
highlight_current_scope = {
module_path = "nvim-treesitter-refactor.highlight_current_scope",
enable = false,
disable = {},
is_supported = queries.has_locals,
},
smart_rename = {
module_path = "nvim-treesitter-refactor.smart_rename",
enable = false,
disable = {},
is_supported = queries.has_locals,
keymaps = {
smart_rename = "grr",
},
},
navigation = {
module_path = "nvim-treesitter-refactor.navigation",
enable = false,
disable = {},
is_supported = queries.has_locals,
keymaps = {
goto_definition = "gnd",
list_definitions = "gnD",
list_definitions_toc = "gO",
goto_next_usage = "<a-*>",
goto_previous_usage = "<a-#>",
},
},
},
}
end
return M