]> git.rmz.io Git - dotfiles.git/commitdiff
nvim: replace which-key with mini.clue
authorSamir Benmendil <me@rmz.io>
Tue, 26 Mar 2024 00:37:43 +0000 (00:37 +0000)
committerSamir Benmendil <me@rmz.io>
Tue, 26 Mar 2024 00:48:04 +0000 (00:48 +0000)
nvim/lua/plugins/ui.lua

index 884225da50025db62a6b016b4264051d736e7428..35882fb2dadbf518bd32e79c9e4b4b2f94ca6bfd 100644 (file)
@@ -1,5 +1,38 @@
 ---@type LazyPluginSpec
 return {
+  -- disabled plugins {{{
+  { "folke/which-key.nvim",
+    enabled = false,
+  },
+  -- }}}
+  { 'echasnovski/mini.clue',
+    -- NOTE: this caused some issue with unterminated mappings, i.e. <L>gc when there 
+    -- is also <L>gcc. It would simply terminate early and not allow for next mapping.
+    version = '*',
+    opts = {
+      triggers = {
+        { mode = 'n', keys = '<Leader>' },
+        { mode = 'x', keys = '<Leader>' },
+        -- `g` key
+        { mode = 'n', keys = 'g' },
+        { mode = 'x', keys = 'g' },
+        -- Marks
+        { mode = 'n', keys = "'" },
+        { mode = 'n', keys = '`' },
+        { mode = 'x', keys = "'" },
+        { mode = 'x', keys = '`' },
+        -- Window commands
+        { mode = 'n', keys = '<C-w>' },
+        -- `z` key
+        { mode = 'n', keys = 'z' },
+        { mode = 'x', keys = 'z' },
+      },
+      clues = {
+        { mode = 'n', keys = '<Leader>b', desc = '+Buffers' },
+        { mode = 'n', keys = '<Leader>c', desc = '+LSP' },
+      },
+    },
+  },
   {
     "nvim-notify",
   },