Initial Commit

This commit is contained in:
Maurice Grönwoldt 2025-07-30 16:05:16 +02:00
commit 18da9560c6
No known key found for this signature in database
GPG key ID: FBB005FE74FEF996
31 changed files with 769 additions and 0 deletions

View file

@ -0,0 +1,40 @@
return {
"nvim-treesitter/nvim-treesitter-textobjects",
dependencies = {
"nvim-treesitter/nvim-treesitter"
},
init = function()
local config = require 'nvim-treesitter.configs';
config.setup({
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ao"] = "@comment.outer",
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
["as"] = { query = "@local.scope", query_group = "locals", desc = "Select language scope" },
},
selection_modes = {
['@parameter.outer'] = 'v', -- charwise
['@function.outer'] = 'V', -- linewise
['@class.outer'] = '<c-v>', -- blockwise
},
include_surrounding_whitespace = true,
},
swap = {
enable = true,
swap_next = {
["<leader>Ca"] = { query = "@parameter.inner", desc = "Swap with next parameter" },
},
swap_previous = {
["<leader>CA"] = "@parameter.inner",
},
},
},
});
end
}