Files
dotfiles/roles/nvim/files/lua/config/plugins/treesitter.lua
2026-04-10 14:08:56 +02:00

40 lines
773 B
Lua

return {
"nvim-treesitter/nvim-treesitter",
branch = "main", -- master is frozen; main required for nvim 0.12+
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
dependencies = {
"windwp/nvim-ts-autotag",
},
config = function()
require('nvim-treesitter').setup({
auto_install = true,
prefer_git = true, -- tarball downloads fail for some parsers on 0.12
highlight = { enable = true },
indent = { enable = true },
install = {
'json',
'javascript',
'typescript',
'yaml',
'html',
'htmldjango',
'css',
'scss',
'markdown',
'markdown_inline',
'bash',
'lua',
'vim',
'dockerfile',
'python',
'gitignore',
'c',
'mdx',
},
})
require('nvim-ts-autotag').setup()
end,
}