Files
work/term/.config/nvim/lua/plugins/treesitter.lua
T

37 lines
851 B
Lua

return {
"nvim-treesitter/nvim-treesitter",
branch = "master",
build = ":TSUpdate",
event = { "BufReadPost", "BufNewFile" },
config = function()
-- Ensure nvim-treesitter queries are preferred over runtime queries
-- This fixes the "except*" syntax error with updated parsers
vim.opt.runtimepath:prepend(vim.fn.stdpath("data") .. "/lazy/nvim-treesitter")
local ok, configs = pcall(require, "nvim-treesitter.configs")
if ok then
configs.setup({
auto_install = true,
ensure_installed = {
"python",
"lua",
"json",
"yaml",
"javascript",
"typescript",
"tsx",
"vue",
"html",
"css",
"bash",
"markdown",
"markdown_inline",
},
highlight = { enable = true },
indent = { enable = true },
folding = { enable = true },
})
end
end,
}