feat: group names for which-key

This commit is contained in:
NotAShelf 2023-02-17 12:40:58 +03:00
parent e79d14cde8
commit 4354cabc39
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1

View file

@ -15,6 +15,35 @@ in {
config = mkIf (cfg.enable) { config = mkIf (cfg.enable) {
vim.startPlugins = ["which-key"]; vim.startPlugins = ["which-key"];
vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere ''local wk = require("which-key").setup {}''; vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere ''
require("which-key").setup {}
local wk = require("which-key")
wk.register({
["<leader>b"] = { name = "+Buffer" },
["<leader>c"] = { name = "+CodeAction" },
["<leader>b"] = { name = "+Buffer" },
["<leader>f"] = { name = "+Telescope" },
["<leader>m"] = { name = "+Minimap" },
["<leader>o"] = { name = "+Notes" },
["<leader>t"] = { name = "+NvimTree" },
["<leader>x"] = { name = "+Trouble" }, -- TODO: move all trouble binds to the same parent group
["<leader>l"] = { name = "+Trouble" },
-- Buffer
["<leader>bm"] = { name = "BufferLineMove" },
["<leader>bm"] = { name = "BufferLineSort" },
-- Telescope
["<leader>fl"] = { name = "Telescope LSP" },
["<leader>fm"] = { name = "Cellular Automaton" }, -- TODO: mvoe this to its own parent group
["<leader>fv"] = { name = "Telescope Git" },
["<leader>fvc"] = { name = "Commits" },
-- Trouble
["<leader>lw"] = { name = "Workspace" },
})
'';
}; };
} }