Files
dotfiles/nvim/lua/plugins/treesitter.lua
T
2026-09-25 20:54:28 +08:00

23 lines
731 B
Lua

-- =============================================================================
-- treesitter.lua — 语法高亮与折叠
-- =============================================================================
return {
{
"nvim-treesitter/nvim-treesitter",
branch = "main", -- master 已被上游归档,main 是现行分支
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
opts = {
ensure_installed = {
"lua", "bash", "rust", "c", "cpp", "cmake",
"python", "java", "go", "json", "toml",
"markdown", "regex", "vim",
},
highlight = { enable = true },
indent = { enable = true },
fold = { enable = true }, -- nvim-ufo 依赖
},
},
}