Files
nvim-config/lua/plugins/treesitter.lua
T
Super_Z 8ad2067a64 feat: VSCode 风格 Neovim 配置
- 分层架构:config/{options,keymaps,lazy} + plugins/
- 保留:blink.cmp, oil.nvim, runner.lua, cmake-tools, diffview, tokyonight
- 新增 UI:bufferline, lualine, noice, nvim-notify, dashboard, dressing
- 新增编辑器:Comment, nvim-surround, vim-illuminate, toggleterm, flash
- 新增视觉:indent-blankline, nvim-ufo, rainbow-delimiters
- 新增 Git:lazygit 集成
- 新增 DAP:persistent-breakpoints, nvim-dap-virtual-text
- 修复:which-key 启用, rustaceanvim 填充, 键位冲突解决
- 语法检查:22/22 文件全部通过 luajit -b
2026-07-16 11:45:07 +08:00

25 lines
824 B
Lua

-- =============================================================================
-- treesitter.lua — 语法高亮
-- =============================================================================
-- 【保留】你的完整 ensure_installed 列表。
-- 【新增】✅ fold 配置让 nvim-ufo 可以使用 treesitter 折叠。
return {
{
"nvim-treesitter/nvim-treesitter",
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 },
-- ✅ 新增:启用 treesitter 折叠(nvim-ufo 依赖)
fold = { enable = true },
},
},
}