From 1bcf3ec5b7b45ae00e516398c6ec1f16d0d80977 Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Sat, 4 Jan 2025 18:34:23 +0100 Subject: [PATCH] updated to the latest api version for which key --- .../nvim/lua/settings/lazy/plugins/barbar.lua | 45 +++++++----------- .../nvim/lua/settings/lazy/plugins/cloak.lua | 32 +++++++------ .../nvim/lua/settings/lazy/plugins/neogit.lua | 24 ++++------ .../nvim/lua/settings/lazy/plugins/neorg.lua | 47 ------------------- .../lua/settings/lazy/plugins/nvim-notify.lua | 27 ----------- 5 files changed, 44 insertions(+), 131 deletions(-) diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/barbar.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/barbar.lua index f319391..62300ad 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/barbar.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/barbar.lua @@ -13,36 +13,27 @@ return { local whichKey = require("which-key") whichKey.register({ - ["b"] = { - name = "Barbar", - d = { - "BarbarDisable", - "Disable Barbar" + "b", + desc = "Barbar", + { + "bc", + desc = "Barbar Close", + { + "bcc", + "BufferCloseAllButCurrent", + desc = "Barbar Close All But Current" }, - e = { - "BarbarEnable", - "Enable Barbar" + { + "bcl", + "BufferCloseAllBuffersLeft", + desc = "Barbar Close All Buffers Left" }, - c = { - name = "Close", - c = { - "BufferCloseAllButCurrent", - "Close all buffers but the current one" - }, - p = { - "BufferCloseAllButPinned", - "Close all buffers but the pinned ones" - }, - l = { - "BufferCloseBuffersLeft", - "Close all buffers to the left" - }, - r = { - "BufferCloseBuffersRight", - "Close all buffers to the right" - } + { + "bcr", + "BufferCloseAllBuffersRight", + desc = "Barbar Close All Buffers Right" } - } + }, }) map("n", "", "BufferPrevious", opts) diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/cloak.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/cloak.lua index c7e6e4a..f8e5bf9 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/cloak.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/cloak.lua @@ -36,21 +36,23 @@ return { }) require("which-key").register({ - ["c"] = { - name = "Cloak", - t = { - ":CloakToggle", - "Toggle" - }, - d = { - ":CloakDisable", - "Disable" - }, - e = { - ":CloakEnable", - "Enable" - } - } + "c", + desc = "Cloak", + { + "ct", + ":CloakToggle", + desc = "Toggle Cloak" + }, + { + "cd", + ":CloakDisable", + desc = "Cloak disable" + }, + { + "ce", + ":CloakDisable", + desc = "Cloak enable" + }, }) end, } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neogit.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neogit.lua index a67fe65..72642c4 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neogit.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neogit.lua @@ -14,21 +14,15 @@ return { neogit.setup({}) whichKey.register({ - ["g"] = { - name = "Neogit", - g = { - function() - neogit.open() - end, - "Open Neogit" - }, - c = { - function() - neogit.open({ "commit" }) - end, - "Open Neogit commit" - } - } + "g", + desc = "Neogit", + { + "go", + function() + neogit.open() + end, + desc = "Neogit open" + }, }) end } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neorg.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neorg.lua index 48ae8db..84108e4 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neorg.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/neorg.lua @@ -68,52 +68,5 @@ return { ["core.export"] = {} }, }) - - require("which-key").register({ - ["o"] = { - name = "Neorg", - i = { - ":Neorg index", - "Index" - }, - r = { - ":Neorg return", - "Return" - }, - l = { - name = "List", - t = { - ":Neorg keybind norg core.pivot.toggle-list-type", - "Toggle" - }, - i = { - ":Neorg keybind norg core.pivot.invert-list-type", - "Invert" - } - }, - w = { - name = "Workspace", - n = { - ":Neorg workspace notes", - "Notes" - }, - d = { - ":Neorg workspace default", - "Default" - } - }, - p = { - name = "Presenter", - s = { - ":Neorg presenter start", - "Start", - }, - S = { - ":Neorg presenter stop", - "Stop", - }, - }, - }, - }) end, } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvim-notify.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvim-notify.lua index 9e094fb..bfe3c97 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvim-notify.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvim-notify.lua @@ -6,33 +6,6 @@ return { vim.notify = notify - require("which-key").register({ - ["u"] = { - name = "User Interface", - n = { - name = "Notification", - e = { - function() - vim.notify = notify - end, - "Enable notifications" - }, - d = { - function() - vim.notify = function() end - end, - "Disable notifications" - }, - l = { - function() - require("telescope").extensions.notify.notify() - end, - "List notifications" - } - } - } - }) - require("notify.config").setup({ enabled = false, stages = "fade_in_slide_out",