Files
dotfiles/dot_config/nvim/lua/plugins/treesitter.lua
s0wlz (Matthias Puchstein) ca2b441bb7 nvim,tmux,kitty: full config overhaul (AstroNvim → native 0.12)
Replaces AstroNvim v5 with from-scratch Neovim 0.12 config using
vim.lsp.config()/vim.lsp.enable() natively, lazy.nvim, blink.cmp,
and smart-splits tmux integration.

tmux: new C-Space prefix, hjkl pane nav, resize key table, tpm plugins.
kitty: add allow_remote_control for smart-splits.
2026-04-09 23:30:34 +02:00

71 lines
1.9 KiB
Lua

return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPost", "BufNewFile" },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
opts = {
ensure_installed = {
"lua", "rust", "typescript", "javascript", "svelte",
"java", "latex", "markdown", "markdown_inline",
"yaml", "toml", "bash", "html", "css", "jinja",
"json", "vim", "vimdoc", "regex",
},
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = { "latex" }, -- needed for vimtex
},
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["am"] = "@function.outer",
["im"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
["a,"] = "@parameter.outer",
["i,"] = "@parameter.inner",
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
["]m"] = "@function.outer",
["]c"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]C"] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[c"] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[C"] = "@class.outer",
},
},
},
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
}