treesitter is cool

This commit is contained in:
2026-04-23 00:25:27 +02:00
parent 657764eab6
commit b4a88a9cb2
2 changed files with 16 additions and 8 deletions
+13 -8
View File
@@ -1,8 +1,13 @@
require("nvim-treesitter.config").setup {
ensure_installed = "all",
sync_install = true,
auto_install = true,
highlight = { enable = true, additional_vim_regex_highlighting = false },
indent = { enable = true, disable = {} },
autotag = { enable = true },
}
local treesitter = require "nvim-treesitter"
treesitter.install { "all" }
local parsers = treesitter.get_installed()
vim.api.nvim_create_autocmd("FileType", {
pattern = parsers,
callback = function()
vim.treesitter.start()
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})