Updated which-key config

This commit is contained in:
Dreaded_X 2025-01-26 03:32:41 +01:00
parent d3239f37f1
commit 5f1666094c
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
2 changed files with 55 additions and 11 deletions

View File

@ -2,22 +2,63 @@
return {
"folke/which-key.nvim",
opts = {
window = {
preset = "modern",
delay = function(ctx)
return ctx.plugin and 0 or 500
end,
win = {
border = "single",
margin = { 1, 5, 2, 3 },
padding = { 0, 0, 0, 0 },
padding = { 1, 1 },
title = false,
},
icons = {
mappings = false,
colors = false,
keys = {
Up = "<u> ",
Down = "<d> ",
Left = "<l> ",
Right = "<r> ",
C = "<c> ",
M = "<m> ",
S = "<s> ",
CR = "<cr> ",
Esc = "<esc> ",
BS = "<bs>",
Space = "<space> ",
Tab = "<tab> ",
F1 = "<F1> ",
F2 = "<F2> ",
F3 = "<F3> ",
F4 = "<F4> ",
F5 = "<F5> ",
F6 = "<F6> ",
F7 = "<F7> ",
F8 = "<F8> ",
F9 = "<F9> ",
F10 = "<F10> ",
F11 = "<F11> ",
F12 = "<F12> ",
},
},
},
init = function()
-- TODO: Only make a category show up if there actually are any keybinds under it
require("which-key").register({
["<leader>g"] = { name = "[G]it", _ = "which_key_ignore" },
["<leader>b"] = { name = "[B]buffer", _ = "which_key_ignore" },
["<leader>s"] = { name = "[S]earch", _ = "which_key_ignore" },
["<leader>c"] = { name = "[C]ode", _ = "which_key_ignore" },
["<leader>d"] = { name = "[D]ocument", _ = "which_key_ignore" },
["<leader>w"] = { name = "[W]orkspace", _ = "which_key_ignore" },
["<leader>r"] = { name = "[R]e[N]ame", _ = "which_key_ignore" },
require("which-key").add({
{ "<leader>b", group = "[B]buffer" },
{ "<leader>b_", hidden = true },
{ "<leader>c", group = "[C]ode" },
{ "<leader>c_", hidden = true },
{ "<leader>d", group = "[D]ocument" },
{ "<leader>d_", hidden = true },
{ "<leader>g", group = "[G]it" },
{ "<leader>g_", hidden = true },
{ "<leader>r", group = "[R]e[N]ame" },
{ "<leader>r_", hidden = true },
{ "<leader>s", group = "[S]earch" },
{ "<leader>s_", hidden = true },
{ "<leader>w", group = "[W]orkspace" },
{ "<leader>w_", hidden = true },
})
end,
}

View File

@ -56,6 +56,9 @@ return {
NeoTreeTabInactive = { fg = palette.light4, bg = palette.dark2 },
NeoTreeTabSeparatorActive = { link = "NeoTreeTabActive" },
NeoTreeTabSeparatorInactive = { link = "NeoTreeTabInactive" },
WhichKey = { fg = palette.bright_aqua, bold = true },
WhichKeyDesc = { fg = palette.light1 },
WhichKeyGroup = { fg = palette.neutral_blue, bold = true },
},
})