From 264372de0923616c4f50ac4f7300d15266df734c Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 2 Apr 2023 22:54:19 +0300 Subject: [PATCH] fix: incorrect which-key registry --- modules/utility/binds/which-key/config.nix | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/utility/binds/which-key/config.nix b/modules/utility/binds/which-key/config.nix index 967d4f7..e2f5ae1 100644 --- a/modules/utility/binds/which-key/config.nix +++ b/modules/utility/binds/which-key/config.nix @@ -11,19 +11,18 @@ in { vim.startPlugins = ["which-key"]; vim.luaConfigRC.whichkey = nvim.dag.entryAnywhere '' - local wk = require("which-key") - wk.setup {} + local wk = require("which-key") + wk.setup ({ + key_labels = { + [""] = "SPACE", + [""] = "SPACE", + [""] = "RETURN", + [""] = "TAB", + } + }) - - wk.register({ - key_labels = { - [""] = "SPACE", - [""] = "SPACE", - [""] = "RETURN", - [""] = "TAB", - }, - - ${ + wk.register({ + ${ if config.vim.tabline.nvimBufferline.enable then '' -- Buffer @@ -31,12 +30,11 @@ in { ["bm"] = { name = "BufferLineMove" }, ["bs"] = { name = "BufferLineSort" }, ["bsi"] = { name = "BufferLineSortById" }, - '' else "" } - ${ + ${ if config.vim.telescope.enable then '' ["f"] = { name = "+Telescope" }, @@ -49,7 +47,7 @@ in { else "" } - ${ + ${ if config.vim.lsp.trouble.enable then '' -- Trouble @@ -60,7 +58,7 @@ in { else "" } - ${ + ${ if config.vim.lsp.nvimCodeActionMenu.enable then '' -- Parent Groups @@ -69,7 +67,7 @@ in { else "" } - ${ + ${ if config.vim.minimap.codewindow.enable || config.vim.minimap.minimap-vim.enable then '' -- Minimap @@ -78,7 +76,7 @@ in { else "" } - ${ + ${ if config.vim.notes.mind-nvim.enable || config.vim.notes.obsidian.enable || config.vim.notes.orgmode.enable then '' -- Notes @@ -89,7 +87,7 @@ in { else "" } - ${ + ${ if config.vim.filetree.nvimTreeLua.enable then '' -- NvimTree @@ -98,7 +96,7 @@ in { else "" } - ${ + ${ if config.vim.git.gitsigns.enable then '' -- Git @@ -106,7 +104,8 @@ in { '' else "" } - ${ + + ${ if config.vim.markdown.glow.enable then '' -- Markdown @@ -114,6 +113,7 @@ in { '' else "" } + }) ''; };