90 lines
2 KiB
Lua
90 lines
2 KiB
Lua
require("nvim-treesitter.configs").setup {
|
|
highlight = {
|
|
enable = true,
|
|
disable = { "org" },
|
|
additional_vim_regex_highlighting = { "org" },
|
|
},
|
|
indent = {
|
|
enable = true,
|
|
},
|
|
autotag = {
|
|
enable = true,
|
|
},
|
|
refactor = {
|
|
highlight_definitions = { enable = true },
|
|
highlight_current_scope = { enable = true },
|
|
smart_rename = {
|
|
enable = true,
|
|
keymaps = {
|
|
smart_rename = "<leader>R",
|
|
},
|
|
},
|
|
navigation = {
|
|
enable = true,
|
|
keymaps = {
|
|
goto_definition_lsp_fallback = "gnd",
|
|
list_definitions = "gnD",
|
|
list_definitions_toc = "gO",
|
|
goto_next_usage = "<a-*>",
|
|
goto_previous_usage = "<a-#>",
|
|
},
|
|
},
|
|
},
|
|
incremental_selection = {
|
|
enable = true,
|
|
keymaps = {
|
|
init_selection = "<CR>",
|
|
scope_incremental = "<CR>",
|
|
node_incremental = "<TAB>",
|
|
node_decremental = "<S-TAB>",
|
|
},
|
|
},
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
keymaps = {
|
|
["af"] = "@function.outer",
|
|
["if"] = "@function.inner",
|
|
["ac"] = "@class.outer",
|
|
["ic"] = "@class.inner",
|
|
["aa"] = "@parameter.outer",
|
|
["ia"] = "@parameter.inner",
|
|
},
|
|
},
|
|
swap = {
|
|
enable = true,
|
|
swap_next = {
|
|
["<C-l>"] = "@parameter.inner",
|
|
},
|
|
swap_previous = {
|
|
["<C-h>"] = "@parameter.inner",
|
|
},
|
|
},
|
|
move = {
|
|
enable = true,
|
|
goto_next_start = {
|
|
["]m"] = "@function.outer",
|
|
["]]"] = "@class.outer",
|
|
},
|
|
goto_next_end = {
|
|
["]M"] = "@function.outer",
|
|
["]["] = "@class.outer",
|
|
},
|
|
goto_previous_start = {
|
|
["[m"] = "@function.outer",
|
|
["[["] = "@class.outer",
|
|
},
|
|
goto_previous_end = {
|
|
["[M"] = "@function.outer",
|
|
["[]"] = "@class.outer",
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
vim.g.skip_ts_context_commentstring_module = true
|
|
|
|
require("ts_context_commentstring").setup {
|
|
enable_autocmd = false,
|
|
}
|