67 Commits

Author SHA1 Message Date
xfy
a6a7e0ebc9 feat(conform): 支持 jsonc 文件格式化 2026-06-24 17:58:17 +08:00
xfy
46e7269824 feat(statusline): 文件名段统一相对路径,不再显示绝对路径
覆盖 section_filename:默认宽窗口走 %F(绝对路径),改为宽窗口 %f
(相对路径)/ 窄窗口降级 %t(仅文件名)。
2026-06-22 17:49:52 +08:00
xfy
209c5c9fad feat(statusline): 隐藏 LSP 段
section_lsp 默认显示 '󰰎 +'(加号数量 = attach 的 LSP client 数),
与 git/diff 同方式覆盖返回空串隐藏。
2026-06-22 17:44:28 +08:00
xfy
8b7d894c94 feat(statusline): 隐藏 diff 段
与 section_git 同样方式覆盖 section_diff 返回空串。
2026-06-22 17:42:13 +08:00
xfy
c276912de0 feat(statusline): 隐藏状态栏 git 分支名
覆盖 section_git 返回空串,combine_groups 自动跳过空段不留空格。
2026-06-22 17:40:31 +08:00
xfy
6a30a0bfea feat(statusline): 启用 mini.statusline 最简配置
VimEnter 时机与 mini.icons 同处 setup(statusline 依赖图标),
用内置 section 组合 + use_icons=true,Git/diff 段回退到 gitsigns。
all_modules 同步补 statusline。
2026-06-22 15:14:54 +08:00
xfy
5ff42e4f20 fix(pick): <leader>ft filetype 切换作用到目标 buffer
choose 回调执行时 picker 浮窗仍是当前窗口,原 vim.bo.filetype = item
会把 filetype 设到 picker 自己的 buffer 上,用户 buffer 纹丝不动
(:set ft? 显示空)。

两处问题:
- item 类型:mini.pick 传入的是 table,需构造 {text=ft} 形态并取 .text
- buffer 上下文:用 MiniPick.get_picker_state().windows.target 拿目标窗口,
  显式在其 buffer 上设 filetype
2026-06-22 11:38:19 +08:00
xfy
64cda37ce9 fix(starter): all_modules 补回 extra 修复模块统计偏差
extra 在 plugins/pick.lua 中经 lazy.load("extra", ...) 单独 track,
但 all_modules 漏列,导致按 <leader>ff 后页脚显示 15/22(loaded 比 total 多)。
2026-06-22 10:17:20 +08:00
xfy
2323c01796 feat(clue): 启用 mini.clue 按键提示浮窗
- VimEnter setup 注册 <Leader>/g/z/<C-w>/[ ] 触发器,配 9 组 +中文描述
- LspAttach 与 gitsigns on_attach 调 ensure_buf_triggers 兜底触发器顺序
- starter all_modules 补 clue,AGENTS.md 同步懒加载策略
2026-06-22 10:14:05 +08:00
xfy
f428eee797 refactor(pack): 分组注释对齐实现,诚实化职责声明
pack.lua 头部原写“具体插件配置和键位移至 plugins/”,但实际直接
setup 了 12 个插件。修正职责声明:
- 明确“直接 setup 通用/轻量插件,功能域插件移至 plugins/”
- 补充拆分规则:配置简单留本文件,配置复杂移 plugins/
- 将 12 个 setup 按 UI 层/编辑增强/补全/重型模块/独立工具 五类分组
- 每个插件的单行说明合并到分组标题下,减少重复注释
2026-06-16 10:06:57 +08:00
xfy
e013cb9e88 fix(fold): 排除 help/man/qf 等特殊 filetype 的 treesitter 折叠
FileType autocmd 对所有文件类型触发,help/qf 原生的 manual 折叠
被 expr 覆盖。增加 filetype 排除表,保留特殊窗口的原生折叠行为,
使实现与注释承诺一致。
2026-06-16 09:59:28 +08:00
xfy
6b1cb2d794 fix: 清理配置死代码与修正 foldmethod 作用域
- options.lua: 删除 MiniDiffSign 高亮链接(mini.diff 已移除,死代码)
- options.lua: 删除关于 ftplugin 的误导注释(目录不存在)
- autocmds.lua: foldmethod 从 vim.o 全局改为 vim.wo window-local,
  事件从 BufEnter+once 改为 FileType,避免污染 help/man/quickfix 窗口
- keymaps.lua: 4 处 vim.keymap.set 统一为 map 别名
- git.lua: codediff view 键位 hs/hu/hr/cs 统一为 ghs/ghu/ghr/gs,
  与 gitsigns 的 gh* 命名空间一致
2026-06-16 09:56:47 +08:00
xfy
00b13a18f5 feat(lsp): 自定义诊断 sign column 标志符号
覆盖 Neovim 0.12 默认的 E/W/I/H 字母标志,使用更直观的符号
✖/▲/i/h,同时保留行尾 virtual_text 显示。
2026-06-16 09:46:22 +08:00
xfy
2afb5315ce refactor(git): 替换 vim-fugitive 为 neogit 工具栈
移除 vim-fugitive 和 mini.diff,引入三层 Git 工具栈(对齐 nvchad 分支):
- gitsigns.nvim:buffer 级 inline gutter + hunk 操作(BufReadPost 懒加载)
- neogit:仓库级 status 客户端(<leader>gg,依赖 plenary)
- codediff.nvim:文件级 side-by-side diff(<leader>gd/gD)

键位变更:
- ghs/ghr/ghp/ghb/ghB/ghd/ghD + ]h/[h 改由 gitsigns 提供
- <leader>gg → Neogit、<leader>gd/gD → CodeDiff
- 移除 <leader>gl(GcLog,由 neogit 内部 log 视图取代)

三个独立插件统一采用 load_X() → packadd → require().setup() 加载风格
2026-06-16 09:33:14 +08:00
xfy
de477f3476 chore: ignore docs/superpowers 2026-06-12 18:18:45 +08:00
xfy
f21e467b88 refactor(pack): 合并 grug-far 键位并支持 visual 选中文本预填充 2026-06-12 18:14:34 +08:00
xfy
81f2a8d4cb fix(lazy): 命令触发懒加载保留完整参数且加载失败时不删命令 2026-06-12 18:14:29 +08:00
xfy
beb75d3a17 fix(lazy): 按键触发加载失败时不执行后续 action
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 18:08:48 +08:00
xfy
51302fe9f2 fix(lazy): setup 成功后才标记模块为已加载
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 18:06:18 +08:00
xfy
f7cf22ef2a feat(git): 新增 <leader>gl 运行 :GcLog 2026-06-11 23:57:41 +08:00
xfy
e6176c9f5d fix(treesitter): 移除 Neovim 内置的 parser,避免 Windows MSVC 编译失败 2026-06-11 23:49:40 +08:00
xfy
861948efe9 feat(git): 新增 <leader>ghr 重置当前 hunk 功能 2026-06-05 13:58:52 +08:00
xfy
e0c2b38b3b refactor: 重构代码组织,统一模块职责与懒加载策略
- 拆分 pack.lua 过载内容:starter→plugins/starter.lua, files→plugins/files.lua
- 统一 Git 键位到 git.lua,统一 pick 键位到 pick.lua
- 移动 TextYankPost autocmd 从 options.lua 到 autocmds.lua
- 修正 colors_name 与文件名匹配,删除 4 个未使用 colorscheme
- 删除 keymaps.lua 重复映射,移除 all_modules 中的 ex-colors
- 修正 plugins/ 文件头注释路径,删除 moonfly 残留变量
- 提取 mini.files 公共函数消除 starter buffer 中的重复逻辑
2026-06-04 15:21:44 +08:00
xfy
dd29f692ee chore(git): 将 fugitive 键位集中至 pack.lua 并启用懒加载 2026-06-04 13:44:29 +08:00
xfy
f4316308c4 fix gitignore 2026-06-03 10:32:18 +08:00
xfy
58f777ab48 update treesitter 2026-06-03 10:16:52 +08:00
xfy
169492b9eb docs(readme): 将截图链接改为内嵌图片格式 2026-06-02 16:06:40 +08:00
xfy
fea4a4ff2b docs(readme): add screenshot link and clean up table formatting 2026-06-02 16:04:29 +08:00
xfy
593e983453 docs(readme): 更新插件列表和懒加载表,新增 AGENTS.md 和 PLUGINS.md 文档 2026-06-02 14:52:49 +08:00
xfy
57f5c86a08 fix(pack): <leader>gg 改为在当前窗口打开 Fugitive 2026-06-02 11:41:16 +08:00
xfy
b619712b35 feat(pack): 新增 mini.cursorword 插件,自动高亮光标下单词 2026-06-01 10:32:28 +08:00
xfy
1df2d036c9 feat(pack): 新增 mini.pairs 和 mini.ai 插件 2026-06-01 10:24:36 +08:00
xfy
daffb7e2f5 新增 :PackClean 命令,用于清理未使用插件 2026-05-29 11:30:50 +08:00
xfy
124ebad93e 格式化 terminal_color 变量列表 2026-05-29 11:30:49 +08:00
xfy
1df2964436 禁用 ex-colors.nvim 插件 2026-05-29 11:30:46 +08:00
xfy
91adf5e44c docs: 将 README 拆分为 MAPS.md 和 DEVELOPMENT.md 2026-05-29 11:24:29 +08:00
xfy
dc867a372a feat(colors): add comprehensive highlight groups for plugins and syntaxes 2026-05-29 10:59:47 +08:00
xfy
4bd841fab1 docs(readme): 补充 ex-colors、键位映射等文档; fix(pack): mini.starter/notify 添加 pcall 保护 2026-05-29 10:57:19 +08:00
xfy
3f0d338fb8 feat: ex catppuccin 2026-05-29 10:49:31 +08:00
xfy
e0dfc66055 feat(keymaps): 增加自动格式化开关并调整 undotree 快捷键 2026-05-29 10:44:05 +08:00
xfy
f12f0f110b fix(pack): 修正 logo 变量名 logs -> logos\nfeat(lsp): 添加 <leader>cr 重命名符号快捷键 2026-05-29 10:06:27 +08:00
xfy
aa00138ffb 简化启动时间统计逻辑,移除 VimEnter 延迟
删除 VimEnter autocmd 和 nvim_vimenter_done 全局变量,
直接在 starter footer 中使用 nvim_init_done 计算启动耗时。
这样更准确地反映配置文件本身的加载时间,不含 runtime
插件和 ShaDa 的加载耗时。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:47:48 +08:00
xfy
5e2334fc33 排除 .git 目录的文件查找结果
在 <leader>ff(文件查找)和 <leader>fa(查找所有文件)的 rg 命令中
添加 --glob "!.git/" 参数,避免搜索结果中出现 .git 目录下的内部文件。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:39:35 +08:00
xfy
395c589993 添加项目级 CLAUDE.md 配置文档,优化文件查找使用 rg
- 新增 .claude/CLAUDE.md 项目配置文档
- 从 .gitignore 中移除 .claude/ 以纳入版本控制
- <leader>ff 改用 mini.pick.builtin.cli 配合 rg --files --hidden

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:36:07 +08:00
xfy
93148248d5 将 README 全面翻译为中文并完善文档,修复 <leader>ss 替换映射
- README.md:完整中文化,补充所有键位映射分类(文件查找、Git、
  LSP、Buffer、窗口、终端等),更新文件结构说明,添加开发验证命令
- lua/keymaps.lua:修复 <leader>ss 映射,移除 <<C-r><C-w>> 中多余的
  < > 包围,使替换功能正常工作

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:22:28 +08:00
xfy
a48d83cc2f Remove moonfly colorscheme and refine mini.files keymaps
- Delete colors/moonfly.vim (unused theme)
- Remove <leader>- binding for mini.files
- Add _ binding to open mini.files at project root (git root)
- Update starter page keymaps accordingly

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 16:57:54 +08:00
xfy
9c8deeafc8 Reorganize config modules into lua/plugins/ and add comprehensive docs
- Move lsp.lua, pick.lua, treesitter.lua, git.lua to lua/plugins/
- Update all require() paths in pack.lua and init.lua
- Unify code style: tab indentation, line length control, empty braces
- Add detailed Chinese module documentation to all config files
- Add grug-far.nvim plugin with <leader>sr binding
- Enable vim._core.ui2 for Neovim 0.12+ UI enhancements
- Disable additional built-in plugins to reduce startup overhead

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 16:42:02 +08:00
xfy
79af59f4f2 Add multiple ASCII logo variants and project README
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 16:27:57 +08:00
xfy
0747abefee Use VimEnter time for more accurate startup duration in starter dashboard
Prioritize _G.nvim_vimenter_done (recorded when runtime plugins and ShaDa
are fully loaded) for the startup time displayed in mini.starter's footer,
falling back to _G.nvim_init_done if unavailable. This makes the reported
duration much closer to what --startuptime measures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 16:05:59 +08:00
xfy
ae765f7438 Add lazy.track() for accurate module loading statistics in starter dashboard
- Introduce lazy.track(name) to mark directly-loaded modules as loaded
  without invoking their setup function again.
- Replace plugin-package counting with a fixed module list (15 functional
  modules) so the starter footer shows consistent X/Y progress.
- Call lazy.track() for starter, notify, cmdline, lspconfig, and mason.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:47:02 +08:00