feat(treesitter): refactor module

This commit is contained in:
victorkamoto 2024-04-14 04:18:09 +03:00
parent 4aee6c1400
commit f5d5b06b9c

View file

@ -42,6 +42,9 @@ return {
end end
end, end,
}, },
{
"nvim-treesitter/nvim-treesitter-refactor",
},
}, },
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
keys = { keys = {
@ -96,6 +99,26 @@ return {
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" },
}, },
}, },
refactor = {
highlight_definitions = { enable = true },
smart_rename = {
enable = true,
keymaps = {
smart_rename = "grr",
},
},
navigation = {
enable = true,
keymaps = {
goto_definition = false,
list_definitions = false,
list_definitions_toc = false,
goto_next_usage = { ["]]"] = "Next reference" },
goto_previous_usage = { ["[["] = "Previous reference" },
},
},
},
}, },
---@param opts TSConfig ---@param opts TSConfig
config = function(_, opts) config = function(_, opts)