neovim/lua/plugins/treesitter.lua
2024-12-24 00:21:08 -08:00

47 lines
831 B
Lua

return {
{
"nvim-treesitter/nvim-treesitter",
version = false,
build = ":TSUpdate",
event = { "VeryLazy" },
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
opts = {
ensure_installed = {
"graphql",
"html",
"htmldjango",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"markdown",
"markdown_inline",
"php",
"pug",
"tsx",
"twig",
"typescript",
"vim",
"vimdoc",
},
highlight = { enable = true },
indent = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
{
"windwp/nvim-ts-autotag",
event = "VeryLazy",
ft = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
},
opts = {},
},
}