nvim/lua/plugins/treesitter.lua
2025-02-09 19:30:29 -08:00

43 lines
1.3 KiB
Lua

return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
-- enable syntax highlighting
highlight = {
enable = true,
},
-- enable indentation
indent = { enable = true },
-- enable autotagging (w/ nvim-ts-autotag plugin)
autotag = { enable = true },
-- ensure these language parsers are installed
ensure_installed = {
"json",
"javascript",
"query",
"typescript",
"tsx",
"php",
"yaml",
"html",
"css",
"markdown",
"markdown_inline",
"bash",
"lua",
"vim",
"vimdoc",
"c",
"dockerfile",
"gitignore",
"astro",
},
-- auto install above language parsers
auto_install = true,
})
end
}
}