39 lines
908 B
Lua
39 lines
908 B
Lua
return {
|
|
"nvim-treesitter/nvim-treesitter",
|
|
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,
|
|
-- Disable additional_vim_regex_highlighting to avoid conflicts
|
|
additional_vim_regex_highlighting = false,
|
|
},
|
|
indent = { enable = true },
|
|
})
|
|
end
|
|
end,
|
|
}
|