Files
nvim-config/lua/plugins/whichkey.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

66 lines
2.0 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- =============================================================================
-- whichkey.lua — 键位提示
-- =============================================================================
-- 【修复】原配置 enabled = false 直接禁用了,现在启用。
-- 【修改】🔧 enabled 改为 true
-- 🔧 更完善的分组和图标配置。
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
preset = "modern",
delay = 200,
icons = {
breadcrumb = "»",
separator = "➜",
group = "+",
},
win = {
border = "rounded",
padding = { 1, 1 },
wo = { winblend = 0 },
},
plugins = {
spelling = { enabled = true, suggestions = 20 },
presets = {
operators = false,
motions = false,
text_objects = false,
windows = false,
nav = false,
z = true,
g = true,
},
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
-- ✅ 新增:键位分组提示
wk.add({
{ "<leader>f", group = "搜索" },
{ "<leader>g", group = "Git" },
{ "<leader>h", group = "Hunk 操作" },
{ "<leader>l", group = "LSP" },
{ "<leader>r", group = "运行/调试" },
{ "<leader>c", group = "CMake/C++" },
{ "<leader>b", group = "标签操作" },
{ "<leader>bc", desc = "关闭标签" },
{ "<leader>bo", desc = "关闭其他标签" },
{ "<leader>d", group = "调试操作" },
{ "<leader>db", desc = "切换断点" },
{ "<leader>du", desc = "调试界面" },
{ "<leader>dd", desc = "行诊断" },
{ "<leader>W", group = "窗口操作" },
{ "<leader>e", group = "文件浏览" },
{ "z", group = "折叠" },
{ "zM", desc = "关闭所有折叠" },
{ "zR", desc = "展开所有折叠" },
})
end,
},
}