diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua index 2e5174f..6c553ff 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/lua/plugins/treesitter.lua @@ -11,7 +11,21 @@ return { }, indent = { enable = true - } + }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + ["ia"] = "@parameter.inner", + ["aa"] = "@parameter.outer", + }, + }, + }, }, after = function(plug) require("nvim-treesitter.configs").setup(plug.opts) @@ -19,4 +33,13 @@ return { vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' end }, + + { + "ts-comments.nvim", + lazy = false, + load = function() end, + after = function() + require("ts-comments").setup({}) + end, + }, }