feat(neovim): expand nvim-treesitter config

This commit is contained in:
Felix Schröter 2021-03-08 19:44:54 +01:00
parent f6b3cd6382
commit 2e82835d6f
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58

View file

@ -7,10 +7,18 @@ require'nvim-treesitter.configs'.setup {
}, },
indent = { indent = {
enable = true, enable = true,
-- TODO seems to be broken atm
disable = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
}, },
refactor = { refactor = {
highlight_definitions = { enable = true }, highlight_definitions = { enable = true },
highlight_current_scope = { enable = true }, highlight_current_scope = { enable = true },
smart_rename = {
enable = true,
keymaps = {
smart_rename = "grr",
},
},
navigation = { navigation = {
enable = true, enable = true,
keymaps = { keymaps = {
@ -43,5 +51,33 @@ require'nvim-treesitter.configs'.setup {
["ia"] = "@parameter.inner", ["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",
},
},
}, },
} }