diff --git a/.config/nvim/lua/plugin/mini.lua b/.config/nvim/lua/plugin/mini.lua index 3c56aef..2ad5973 100644 --- a/.config/nvim/lua/plugin/mini.lua +++ b/.config/nvim/lua/plugin/mini.lua @@ -19,7 +19,51 @@ require('mini.comment').setup() -- for toggling comments inline require('mini.move').setup() -- moving lines require('mini.operators').setup() -- duplicating lines and evaluating equations inline require('mini.surround').setup() -- surround stuff -require('mini.diff').setup({ -- shows git diffs in the file +require('mini.clue').setup({ -- shows available keybinds when performing keybind actions + window = { delay = 50 }, + triggers = { + -- Leader triggers + { mode = 'n', keys = '' }, + { mode = 'x', keys = '' }, + + -- Built-in completion + { mode = 'i', keys = '' }, + + -- `g` key + { mode = 'n', keys = 'g' }, + { mode = 'x', keys = 'g' }, + + -- Marks + { mode = 'n', keys = "'" }, + { mode = 'n', keys = '`' }, + { mode = 'x', keys = "'" }, + { mode = 'x', keys = '`' }, + + -- Registers + { mode = 'n', keys = '"' }, + { mode = 'x', keys = '"' }, + { mode = 'i', keys = '' }, + { mode = 'c', keys = '' }, + + -- Window commands + { mode = 'n', keys = '' }, + + -- `z` key + { mode = 'n', keys = 'z' }, + { mode = 'x', keys = 'z' }, + }, + + clues = { + -- Enhance this by adding descriptions for mapping groups + require('mini.clue').gen_clues.builtin_completion(), + require('mini.clue').gen_clues.g(), + require('mini.clue').gen_clues.marks(), + require('mini.clue').gen_clues.registers(), + require('mini.clue').gen_clues.windows(), + require('mini.clue').gen_clues.z(), + }, +}) +require('mini.diff').setup({ -- shows git diffs in the file view = { style = 'sign', } diff --git a/.config/nvim/lua/plugin/which-key.lua b/.config/nvim/lua/plugin/which-key.lua deleted file mode 100644 index 6fe03f8..0000000 --- a/.config/nvim/lua/plugin/which-key.lua +++ /dev/null @@ -1,51 +0,0 @@ ----@type LazySpec -return { { -- displays pending keybinds, helps with remembering keybinds - 'folke/which-key.nvim', - event = 'VeryLazy', - ---@module 'which-key' - ---@type wk.Opts - opts = { - delay = 0, -- delay in MS between pressing a key and opening which-key - icons = { - mappings = true, - keys = { - Up = '', - Down = '', - Left = '', - Right = '', - C = '󰘴', - M = '󰘵', - D = '󰘳', - S = '󰘶', - CR = '󰌑', - Esc = '󱊷', - ScrollWheelUp = '󱕑', - ScrollWheelDown = '󱕐', - NL = '󰌑', - BS = '󰁮', - Space = '󱁐', - Tab = '󰌒', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', - }, - }, - spec = { -- document the key chains we know about - { 'g', group = 'git' }, - { 's', group = 'search' }, - { 't', group = 'toggle' }, - { 'w', group = 'windows' }, - { 'l', group = 'lsp' }, - { 'wc', group = 'close' }, - }, - }, -} }