nvim: disable treesitter textobjects

This commit is contained in:
Primrose 2025-07-02 15:52:15 +02:00
parent 7b80afac0d
commit 08a525a20b
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -24,33 +24,4 @@ require("nvim-treesitter.configs").setup {
local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then return true end
end,
-- Text objets
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
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>a"] = "@parameter.inner",
},
swap_previous = {
["<leader>A"] = "@parameter.inner",
},
},
},
}