update dotfiles

This commit is contained in:
2026-07-19 19:36:54 +08:00
parent b4010fe910
commit aef001a855
38 changed files with 1680 additions and 826 deletions
+20 -27
View File
@@ -1,31 +1,24 @@
-- ============================================================================
-- 语法高亮 (Tree-sitter)
-- ============================================================================
-- =============================================================================
-- treesitter.lua — 语法高亮
-- =============================================================================
-- 【保留】你的完整 ensure_installed 列表。
-- 【新增】✅ fold 配置让 nvim-ufo 可以使用 treesitter 折叠。
return {
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPre", "BufNewFile" },
build = ":TSUpdate",
opts = {
ensure_installed = {
"lua", -- Lua
"bash", -- Bash
"rust", -- Rust
"c", -- C
"cpp", -- C++
"cmake", -- CMake
"python", -- Python
"java", -- Java
"go", -- Go
"json", -- JSON
"toml", -- TOML
"markdown", -- Markdown
"regex", -- 正则
"vim", -- Vimscript
},
highlight = { enable = true },
indent = { enable = true },
},
{
"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 },
},
},
}