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 f8e5bf9..1f9e9ff 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,23 +36,10 @@ return { }) require("which-key").register({ - "c", - desc = "Cloak", - { - "ct", - ":CloakToggle", - desc = "Toggle Cloak" - }, - { - "cd", - ":CloakDisable", - desc = "Cloak disable" - }, - { - "ce", - ":CloakDisable", - desc = "Cloak enable" - }, + { "c", "Cloak", }, + { "ct", ":CloakToggle", desc = "Toggle" }, + { "cd", ":CloakDisable", desc = "Disable" }, + { "ce", ":CloakEnable", desc = "Enable" }, }) end, } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/icon-picker.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/icon-picker.lua index 6bd133b..ccce895 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/icon-picker.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/icon-picker.lua @@ -10,27 +10,10 @@ return { }) whichKey.register({ - ["i"] = { - name = "Icon Picker", - e = { - function() - vim.cmd("IconPickerInsert emoji") - end, - "Pick emoji" - }, - s = { - function() - vim.cmd("IconPickerInsert symbols") - end, - "Pick symbol" - }, - n = { - function() - vim.cmd("IconPickerInsert nerd_font") - end, - "Pick Nerd font symbol" - } - } + { "i", group = "Icon" }, + { "ie", function() vim.cmd("IconPickerInsert emoji") end, group = "Emoji" }, + { "is", function() vim.cmd("IconPickerInsert symbols") end, group = "Symbol" }, + { "in", function() vim.cmd("IconPickerInsert nerd_font") end, group = "Nerd Font Symbol" }, }) end } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/link-visitor.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/link-visitor.lua index 2dc2e5d..6bdcf89 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/link-visitor.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/link-visitor.lua @@ -9,35 +9,14 @@ return { }, config = function() local whichKey = require("which-key") + local linkVisitor = require("link-visitor"); whichKey.register({ - ["v"] = { - name = "Visit link", - v = { - function() - require("link-visitor").visit() - end, - "Visit", - }, - l = { - function() - require("link-visitor").link_under_cursor() - end, - "Under cursor", - }, - n = { - function() - require("link-visitor").link_near_cursor() - end, - "Near cursor", - }, - N = { - function() - require("link-visitor").link_nearest() - end, - "Near cursor", - }, - }, + { "v", group = "Link", }, + { "vv", function() linkVisitor.visit() end, }, + { "vl", function() linkVisitor.link_under_cursor() end, }, + { "vn", function() linkVisitor.link_near_cursor() end, }, + { "vN", function() linkVisitor.link_nearest() end, }, }) 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 72642c4..649576b 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,15 +14,8 @@ return { neogit.setup({}) whichKey.register({ - "g", - desc = "Neogit", - { - "go", - function() - neogit.open() - end, - desc = "Neogit open" - }, + { "g", group = "Neogit", }, + { "go", function() neogit.open() end, }, }) end } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvimtree.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvimtree.lua index 1374a06..bbae0d6 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvimtree.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/nvimtree.lua @@ -160,48 +160,16 @@ return { local whichKey = require("which-key") whichKey.register({ - ["n"] = { - name = "NvimTree", - w = { - name = "NvimTree Width", - i = { - increment_width, - "Increment NvimTree Width" - }, - d = { - decrement_width, - "Increment NvimTree Width" - }, - a = { - dynamic_width, - "Automatic NvimTree Width" - } - }, - t = { - function() - nvimTreeApi.tree.toggle() - end, - "Toggle NvimTree", - }, - f = { - function() - nvimTreeApi.tree.focus() - end, - "Focus NvimTree", - }, - e = { - function() - nvimTreeApi.tree.expand_all() - end, - "Expand NvimTree", - }, - c = { - function() - nvimTreeApi.tree.collapse_all() - end, - "Collapse NvimTree", - }, - }, + { "n", group = "NvimTree" }, + { "nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" }, + { "nf", function() nvimTreeApi.tree.focus() end, desc = "Focus" }, + { "ne", function() nvimTreeApi.tree.expand_all() end, desc = "Expand All" }, + { "nc", function() nvimTreeApi.tree.collapse_all() end, desc = "Collapse All" }, + { "nw", group = "Width" }, + { "nwi", increment_width, desc = "Increase" }, + { "nwd", decrement_width, desc = "Decrease" }, + { "nwa", dynamic_width, desc = "Decrease" }, + { "nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" }, }) end, } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/telescope.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/telescope.lua index ffc135f..9bcc7ca 100644 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/telescope.lua +++ b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/telescope.lua @@ -12,45 +12,13 @@ return { local whichKey = require("which-key") whichKey.register({ - ["t"] = { - name = "Telescope", - h = { - function() - telescopeBuiltin.help_tags() - end, - "Find help tags" - }, - t = { - function() - telescopeBuiltin.treesitter() - end, - "Explore the Abstract Syntax Tree", - }, - f = { - function() - telescopeBuiltin.find_files() - end, - "Find files", - }, - w = { - function() - telescopeBuiltin.live_grep() - end, - "Find words", - }, - c = { - function() - telescopeBuiltin.colorscheme() - end, - "Find color schemes", - }, - g = { - function() - telescopeBuiltin.git_files() - end, - "Find git files", - }, - }, + { "t", group = "Telescope" }, + { "th", function() telescopeBuiltin.help_tags() end, desc = "Help Tags" }, + { "tt", function() telescopeBuiltin.treesitter() end, desc = "Treesitter" }, + { "tf", function() telescopeBuiltin.find_files() end, desc = "Files" }, + { "tw", function() telescopeBuiltin.live_grep() end, desc = "Words" }, + { "tc", function() telescopeBuiltin.colorscheme() end, desc = "Colorscheme" }, + { "tg", function() telescopeBuiltin.git_files() end, desc = "Colorscheme" }, }) end, } diff --git a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/trouble.lua b/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/trouble.lua deleted file mode 100644 index 555c579..0000000 --- a/ansible/roles/neovim/files/nvim/lua/settings/lazy/plugins/trouble.lua +++ /dev/null @@ -1,122 +0,0 @@ -return { - "folke/trouble.nvim", - opts = { - position = "bottom", -- position of the list can be: bottom, top, left, right - height = 10, -- height of the trouble list when position is top or bottom - width = 50, -- width of the list when position is left or right - icons = true, -- use devicons for filenames - mode = "workspace_diagnostics", - severity = nil, -- nil (ALL) or vim.diagnostic.severity.ERROR | WARN | INFO | HINT - fold_open = "", -- icon used for open folds - fold_closed = "", -- icon used for closed folds - group = true, -- group results by file - padding = true, -- add an extra new line on top of the list - cycle_results = true, -- cycle item list when reaching beginning or end of list - action_keys = { -- key mappings for actions in the trouble list - -- map to {} to remove a mapping, for example: - -- close = {}, - close = "q", - cancel = "", - refresh = "r", - jump = { "", "", "<2-leftmouse>" }, - open_split = { "" }, - open_vsplit = { "" }, - open_tab = { "" }, - jump_close = { "o" }, - toggle_mode = "m", - switch_severity = "s", - toggle_preview = "P", - hover = "K", - preview = "p", - open_code_href = "c", - close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds - toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- previous item - next = "j", -- next item, - help = "?" -- help menu - }, - multiline = true, -- render multi-line messages - indent_lines = true, - win_config = { border = "single" }, - auto_open = false, - auto_close = false, - auto_preview = true, - auto_fold = false, - auto_jump = { "lsp_definitions" }, - include_declaration = { "lsp_references", "lsp_implementations", "lsp_definitions" }, - signs = { - -- icons / text used for a diagnostic - error = "", - warning = "", - hint = "", - information = "", - other = "", - }, - use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client - }, - config = function() - local whichKey = require("which-key") - local trouble = require("trouble") - - whichKey.register({ - ["x"] = { - name = "Trouble", - t = { - function() - trouble.toggle() - end, - "Toggle Trouble" - }, - o = { - function() - trouble.open() - end, - "Open Trouble" - }, - c = { - function() - trouble.close() - end, - "Close Trouble" - }, - n = { - function() - trouble.next({ - skip_groups = true, - jump = true - }) - end, - "Trouble next item" - }, - p = { - function() - trouble.previous({ - skip_groups = true, - jump = true - }) - end, - "Trouble previous item" - }, - f = { - function() - trouble.first({ - skip_groups = true, - jump = true - }) - end, - "Trouble first item" - }, - l = { - function() - trouble.last({ - skip_groups = true, - jump = true - }) - end, - "Trouble last item" - } - } - }) - end -}