refactor(nvim): 完整重写配置,支持 Go/Rust/Python/TypeScript 开发

- 架构重构:新增 plugins/lang/ 子目录,按语言拆分配置
- 补全引擎:nvim-cmp → blink.cmp + LuaSnip
- 文件浏览:新增 neo-tree(<Space>e)
- 语言支持:
  - Go: ray-x/go.nvim + dap-go + neotest-go
  - Rust: rustaceanvim + crates.nvim
  - Python: venv-selector + dap-python + neotest-python
  - TypeScript: typescript-tools.nvim(替换 ts_ls)
- LSP: lazydev + mason + mason-lspconfig + fidget + inc-rename
- 格式化: conform.nvim(lsp_format fallback,保存时自动格式化)
- Lint: nvim-lint(selene 替换 luacheck,Mason 可直接安装)
- UI: snacks.nvim(dashboard+notifier+picker)+ noice + lualine + bufferline
- 编辑增强: mini.ai + mini.surround + grug-far + flash + ufo + trouble v3
- 删除废弃文件: cmp/coding/null-ls/mason/lspconfig/go/python 等旧文件
- 修复: Neovim 0.12 treesitter query 校验报错(noice routes 过滤)
- 新增: NVIM_GUIDE.md 快捷键使用手册

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-07 16:55:07 +08:00
parent 2aa176dff5
commit 6fd5d96043
36 changed files with 2087 additions and 2814 deletions

View File

@@ -8,9 +8,7 @@ opt.termguicolors = true -- 使用终端真彩色
opt.number = true -- 显示行号
opt.relativenumber = true -- 相对行号
opt.cursorline = true -- 高亮当前行
opt.cursorcolumn = true -- 高亮当前列
opt.signcolumn = "auto:1" -- 显示标记列
opt.showmatch = true -- 高亮匹配的括号
opt.signcolumn = "yes" -- 始终显示标记列(避免每次出现符号时布局跳动)
opt.showmode = false -- 不显示模式,由状态栏插件替代
opt.laststatus = 3 -- 全局状态栏
opt.cmdheight = 1 -- 命令行高度
@@ -25,7 +23,6 @@ opt.listchars = { -- 设置不可见字符的显示方式
extends = "",
precedes = "",
nbsp = "",
eol = ""
}
opt.fillchars:append({ -- 分隔符符号设置
vert = "", -- 窗口分隔符
@@ -41,7 +38,6 @@ opt.shiftwidth = 4 -- 缩进宽度
opt.expandtab = true -- 使用空格替代Tab
opt.smartindent = true -- 智能缩进
opt.autoindent = true -- 自动缩进
opt.cindent = true -- C语言缩进规则
opt.textwidth = 120 -- 文本宽度
opt.formatoptions = "jcroqlnt" -- 格式化选项
opt.foldenable = false
@@ -56,7 +52,7 @@ opt.incsearch = true -- 增量搜索
-- 性能设置
opt.hidden = true -- 允许切换未保存的缓冲区
opt.history = 500 -- 历史记录数
opt.history = 1000 -- 历史记录数
opt.updatetime = 100 -- 更新时间ms
opt.timeout = true -- 启用超时
opt.timeoutlen = 300 -- 键映射超时时间ms
@@ -83,6 +79,8 @@ opt.completeopt = "menu,menuone,noselect" -- 补全选项
opt.pumheight = 10 -- 弹出菜单高度
opt.confirm = true -- 显示确认对话框
opt.autoread = true -- 自动重新加载文件
-- 减少消息噪音W=写入/I=intro/c=补全消息/C=扫描消息)
opt.shortmess:append("WIcC")
-- 加载 .nvimrc, .exrc 等本地配置
opt.exrc = true -- 启用 .exrc