treesitter fixes

This commit is contained in:
Daniel Lundin 2022-02-14 14:14:58 +01:00
parent 479d22b666
commit 2b6426dde0

View file

@ -46,32 +46,32 @@ require("nvim-treesitter.configs").setup {
["[M"] = "@class.outer"
}
},
select = {
enable = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
-- Or you can define your own textobjects like this
["iF"] = {
python = "(function_definition) @function",
cpp = "(function_definition) @function",
c = "(function_definition) @function",
java = "(method_declaration) @function"
}
}
},
swap = {
enable = true,
swap_next = {
["<leader>l"] = "@parameter.inner"
},
swap_previous = {
["<leader>h"] = "@parameter.inner"
}
}
-- select = {
-- enable = true,
-- keymaps = {
-- -- You can use the capture groups defined in textobjects.scm
-- ["af"] = "@function.outer",
-- ["if"] = "@function.inner",
-- ["ac"] = "@class.outer",
-- ["ic"] = "@class.inner",
-- -- Or you can define your own textobjects like this
-- ["iF"] = {
-- python = "(function_definition) @function",
-- cpp = "(function_definition) @function",
-- c = "(function_definition) @function",
-- java = "(method_declaration) @function"
-- }
-- }
-- },
-- swap = {
-- enable = true,
-- swap_next = {
-- ["<leader>l"] = "@parameter.inner"
-- },
-- swap_previous = {
-- ["<leader>h"] = "@parameter.inner"
-- }
-- }
},
--- nvim-ts-autotag ---
autotag = {