41 Commits

Author SHA1 Message Date
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
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
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
f21e467b88 refactor(pack): 合并 grug-far 键位并支持 visual 选中文本预填充 2026-06-12 18:14:34 +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
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
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
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
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
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
xfy
4366e3d696 Add comprehensive Chinese comments and uniform 4-space indentation across all config files
- Document every Lua module with detailed Chinese comments explaining
  purpose, design decisions, and key implementation details
- Standardize indentation from tabs to 4 spaces for consistency
- Add .claude/ to .gitignore

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:36:55 +08:00
xfy
c5a31a26f6 Add grug-far.nvim for search and replace
- Add MagicDuck/grug-far.nvim plugin with lazy loading
- Bind to <leader>sr in normal and visual mode
- Auto-filter by current file extension when opening

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:12:04 +08:00
xfy
2c524fc30d Refactor lazy loading: unify treesitter/LSP deferral via lazy.on_event
- Move VimEnter autocmd from init.lua to pack.lua using lazy.on_event
- Convert treesitter.lua to modular M.setup() pattern
- Simplify lsp.lua: remove redundant comment, inline diagnostic config
- Reorganize pack.lua: group finders, add fugitive keymaps, adjust header indent

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:07:01 +08:00
xfy
e0441656b4 Extract git/pick from pack.lua into standalone modules and remove moonfly theme
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 14:57:47 +08:00
xfy
5d40b6c245 Defer heavy modules and disable built-in plugins to reduce startup time
- Disable unused built-in plugins at top of init.lua

- Defer treesitter and lsp to VimEnter

- Use packadd for on-demand plugin loading (conform, lspconfig, fugitive)

- Defer clipboard initialization to avoid provider check blocking

- Wrap LSP/diagnostic keymaps in functions to defer module loading

- Defer mini.icons setup to VimEnter

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 14:39:12 +08:00
xfy
f0c6f0a1e7 Center-align mini.starter footer text
Extract header_lines and compute max_header_width so the footer
can be padded to match the header's visual centering.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 14:14:11 +08:00
xfy
717df254c6 Add mini.starter dashboard and optimize lazy loading
- Add startup time tracking with hrtime in init.lua
- Configure mini.starter with Neovim ASCII logo and plugin stats
- Switch mini.notify to load on first vim.notify call
- Switch mini.cmdline to load on first ':' keypress
- Add mini.icons eager loading
- Remove x-mode 'p' keymap (handled by mini.operators)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 14:11:25 +08:00
xfy
8138b7c761 Update Cw keymaps 2026-05-28 13:26:53 +08:00
xfy
15a2ad9b20 Add hunk preview, blame, and git keymaps; switch diagnostic to loclist
- Replace mini.extra diagnostic picker with vim.diagnostic.setloclist
- Add get_cursor_hunk() helper for mini.diff
- Add preview_hunk() with floating diff window
- Add blame_line() via git blame porcelain
- Add keymaps: <leader>ghp, <leader>ghb, <leader>gB, <leader>gD

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 13:09:27 +08:00
xfy
61f2c89362 Add nil guard to lazy.load and custom mini.diff mappings
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 11:43:06 +08:00
xfy
7c5529c400 Unify indentation to tabs and add keymaps/pickers
- Convert 4-space indentation to tabs across all lua files
- Add <C-s> save file and <C-c> copy whole file keymaps
- Add mini.pick keymaps: <leader>fa (find all), <leader>fh (help),
  <leader>fo (oldfiles), <leader>fz (buffer lines)
- Change <leader>fw to grep_live, <leader>vh to <leader>fh
- Fix conform lazy-loading buffer reference

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 11:36:26 +08:00
xfy
a282113ccf Add conform.nvim for auto-formatting
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 11:22:05 +08:00
xfy
077ec08dc1 Add lazy loading for all plugins
- Create lua/lazy.lua helper with load/on_event/on_keys
- Rewrite pack.lua: lazy load all mini modules + fugitive
- Defer treesitter.install() with vim.defer_fn
- Defer mason + LSP config to VimEnter
- Move mini.pick keymaps from keymaps.lua to pack.lua
- Keep mini.notify and mini.cmdline eager (startup needed)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 11:04:08 +08:00
xfy
a45929aff6 Initial Neovim config
- Add init.lua entry point
- Add lua/ modules: options, keymaps, autocmds, usercmds, pack, treesitter, lsp
- Add .gitignore
- Add nvim-pack-lock.json for plugin version locking

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