fix: incorrect which-key registry

This commit is contained in:
NotAShelf 2023-04-02 22:54:19 +03:00
parent cecf30652e
commit 264372de09
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22

View file

@ -11,19 +11,18 @@ in {
vim.startPlugins = ["which-key"]; vim.startPlugins = ["which-key"];
vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere '' vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere ''
local wk = require("which-key") local wk = require("which-key")
wk.setup {} wk.setup ({
key_labels = {
["<space>"] = "SPACE",
["<leader>"] = "SPACE",
["<cr>"] = "RETURN",
["<tab>"] = "TAB",
}
})
wk.register({
wk.register({ ${
key_labels = {
["<space>"] = "SPACE",
["<leader>"] = "SPACE",
["<cr>"] = "RETURN",
["<tab>"] = "TAB",
},
${
if config.vim.tabline.nvimBufferline.enable if config.vim.tabline.nvimBufferline.enable
then '' then ''
-- Buffer -- Buffer
@ -31,12 +30,11 @@ in {
["<leader>bm"] = { name = "BufferLineMove" }, ["<leader>bm"] = { name = "BufferLineMove" },
["<leader>bs"] = { name = "BufferLineSort" }, ["<leader>bs"] = { name = "BufferLineSort" },
["<leader>bsi"] = { name = "BufferLineSortById" }, ["<leader>bsi"] = { name = "BufferLineSortById" },
'' ''
else "" else ""
} }
${ ${
if config.vim.telescope.enable if config.vim.telescope.enable
then '' then ''
["<leader>f"] = { name = "+Telescope" }, ["<leader>f"] = { name = "+Telescope" },
@ -49,7 +47,7 @@ in {
else "" else ""
} }
${ ${
if config.vim.lsp.trouble.enable if config.vim.lsp.trouble.enable
then '' then ''
-- Trouble -- Trouble
@ -60,7 +58,7 @@ in {
else "" else ""
} }
${ ${
if config.vim.lsp.nvimCodeActionMenu.enable if config.vim.lsp.nvimCodeActionMenu.enable
then '' then ''
-- Parent Groups -- Parent Groups
@ -69,7 +67,7 @@ in {
else "" else ""
} }
${ ${
if config.vim.minimap.codewindow.enable || config.vim.minimap.minimap-vim.enable if config.vim.minimap.codewindow.enable || config.vim.minimap.minimap-vim.enable
then '' then ''
-- Minimap -- Minimap
@ -78,7 +76,7 @@ in {
else "" else ""
} }
${ ${
if config.vim.notes.mind-nvim.enable || config.vim.notes.obsidian.enable || config.vim.notes.orgmode.enable if config.vim.notes.mind-nvim.enable || config.vim.notes.obsidian.enable || config.vim.notes.orgmode.enable
then '' then ''
-- Notes -- Notes
@ -89,7 +87,7 @@ in {
else "" else ""
} }
${ ${
if config.vim.filetree.nvimTreeLua.enable if config.vim.filetree.nvimTreeLua.enable
then '' then ''
-- NvimTree -- NvimTree
@ -98,7 +96,7 @@ in {
else "" else ""
} }
${ ${
if config.vim.git.gitsigns.enable if config.vim.git.gitsigns.enable
then '' then ''
-- Git -- Git
@ -106,7 +104,8 @@ in {
'' ''
else "" else ""
} }
${
${
if config.vim.markdown.glow.enable if config.vim.markdown.glow.enable
then '' then ''
-- Markdown -- Markdown
@ -114,6 +113,7 @@ in {
'' ''
else "" else ""
} }
}) })
''; '';
}; };