fix: new nvim-treesitter config syntax

This commit is contained in:
gutz430 2026-05-19 11:50:55 +02:00
parent 05ac6d2b52
commit 6b290c5939

View file

@ -1,13 +1,24 @@
return { return {
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", "nvim-treesitter/nvim-treesitter",
config = function () lazy = false,
local configs = require("nvim-treesitter.configs") build = ":TSUpdate",
configs.setup({ config = function ()
ensure_installed = { "lua", "vim", "yaml" }, local treesitter = require("nvim-treesitter")
sync_install = false, treesitter.setup()
highlight = { enable = true }, treesitter.install { "lua", "vim", "yaml" }
indent = { enable = true },
}) vim.api.nvim_create_autocmd('FileType', {
end pattern = { "lua", "vim", "yaml" },
} callback = function()
} -- syntax highlighting, provided by Neovim
vim.treesitter.start()
-- folds, provided by Neovim (I don't like folds)
-- vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
-- vim.wo.foldmethod = 'expr'
-- indentation, provided by nvim-treesitter
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})
end
}