From: Samir Benmendil Date: Sun, 9 Feb 2025 23:28:14 +0000 (+0000) Subject: lazyvim: remove which-key X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/eca3163fa25f5d6a4d1aa77d447473141d1a5b79 lazyvim: remove which-key I was already using mini.clue. --- diff --git a/nvim/lua/plugins/coding.lua b/nvim/lua/plugins/coding.lua index 0ebe444..eaa49cf 100644 --- a/nvim/lua/plugins/coding.lua +++ b/nvim/lua/plugins/coding.lua @@ -144,14 +144,6 @@ return { }, } end, - config = function(_, opts) - require("mini.ai").setup(opts) - LazyVim.on_load("which-key.nvim", function() - vim.schedule(function() - LazyVim.mini.ai_whichkey(opts) - end) - end) - end, }, -- comments { "numToStr/Comment.nvim", diff --git a/nvim/lua/plugins/dap.lua b/nvim/lua/plugins/dap.lua index 8657ab8..483d40f 100644 --- a/nvim/lua/plugins/dap.lua +++ b/nvim/lua/plugins/dap.lua @@ -39,16 +39,6 @@ return { opts = {}, }, - -- which key integration - { - "folke/which-key.nvim", - opts = { - defaults = { - ["d"] = { name = "+debug" }, - }, - }, - }, - -- mason.nvim integration { "jay-babu/mason-nvim-dap.nvim", diff --git a/nvim/lua/plugins/editor.lua b/nvim/lua/plugins/editor.lua index 7938053..deab249 100644 --- a/nvim/lua/plugins/editor.lua +++ b/nvim/lua/plugins/editor.lua @@ -194,77 +194,4 @@ return { }, }, }, - { "folke/which-key.nvim", - -- which-key helps you remember key bindings by showing a popup - -- with the active keybindings of the command you started typing. - -- TODO: replace with mini.clue - event = "VeryLazy", - opts_extend = { "spec" }, - opts = { - preset = "helix", - defaults = {}, - spec = { - { - mode = { "n", "v" }, - { "", group = "tabs" }, - { "c", group = "code" }, - { "d", group = "debug" }, - { "dp", group = "profiler" }, - { "f", group = "file/find" }, - { "g", group = "git" }, - { "gh", group = "hunks" }, - { "q", group = "quit/session" }, - { "s", group = "search" }, - { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, - { "[", group = "prev" }, - { "]", group = "next" }, - { "g", group = "goto" }, - { "gs", group = "surround" }, - { "z", group = "fold" }, - { - "b", - group = "buffer", - expand = function() - return require("which-key.extras").expand.buf() - end, - }, - { - "w", - group = "windows", - proxy = "", - expand = function() - return require("which-key.extras").expand.win() - end, - }, - -- better descriptions - { "gx", desc = "Open with system app" }, - }, - }, - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Keymaps (which-key)", - }, - { - "", - function() - require("which-key").show({ keys = "", loop = true }) - end, - desc = "Window Hydra Mode (which-key)", - }, - }, - config = function(_, opts) - local wk = require("which-key") - wk.setup(opts) - if not vim.tbl_isempty(opts.defaults) then - LazyVim.warn("which-key: opts.defaults is deprecated. Please use opts.spec instead.") - wk.register(opts.defaults) - end - end, - }, } diff --git a/nvim/lua/plugins/test.lua b/nvim/lua/plugins/test.lua index e4bc07c..49d6dd6 100644 --- a/nvim/lua/plugins/test.lua +++ b/nvim/lua/plugins/test.lua @@ -1,10 +1,4 @@ return { - { - "folke/which-key.nvim", - opts = { - defaults = { ["t"] = { name = "+test" }, }, - }, - }, { "nvim-neotest/neotest", opts = { diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua index 0cb899a..5271ad6 100644 --- a/nvim/lua/plugins/ui.lua +++ b/nvim/lua/plugins/ui.lua @@ -1,10 +1,5 @@ ----@type LazyPluginSpec +---@type LazySpec return { - -- disabled plugins {{{ - { "folke/which-key.nvim", - enabled = false, - }, - -- }}} { 'echasnovski/mini.clue', -- NOTE: this caused some issue with unterminated mappings, i.e. gc when there -- is also gcc. It would simply terminate early and not allow for next mapping.