replace which-key with a functionality from mini
This commit is contained in:
@@ -19,7 +19,51 @@ require('mini.comment').setup() -- for toggling comments inline
|
|||||||
require('mini.move').setup() -- moving lines
|
require('mini.move').setup() -- moving lines
|
||||||
require('mini.operators').setup() -- duplicating lines and evaluating equations inline
|
require('mini.operators').setup() -- duplicating lines and evaluating equations inline
|
||||||
require('mini.surround').setup() -- surround stuff
|
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 = '<Leader>' },
|
||||||
|
{ mode = 'x', keys = '<Leader>' },
|
||||||
|
|
||||||
|
-- Built-in completion
|
||||||
|
{ mode = 'i', keys = '<C-x>' },
|
||||||
|
|
||||||
|
-- `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 = '<C-r>' },
|
||||||
|
{ mode = 'c', keys = '<C-r>' },
|
||||||
|
|
||||||
|
-- Window commands
|
||||||
|
{ mode = 'n', keys = '<C-w>' },
|
||||||
|
|
||||||
|
-- `z` key
|
||||||
|
{ mode = 'n', keys = 'z' },
|
||||||
|
{ mode = 'x', keys = 'z' },
|
||||||
|
},
|
||||||
|
|
||||||
|
clues = {
|
||||||
|
-- Enhance this by adding descriptions for <Leader> 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 = {
|
view = {
|
||||||
style = 'sign',
|
style = 'sign',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 = '<F1>',
|
|
||||||
F2 = '<F2>',
|
|
||||||
F3 = '<F3>',
|
|
||||||
F4 = '<F4>',
|
|
||||||
F5 = '<F5>',
|
|
||||||
F6 = '<F6>',
|
|
||||||
F7 = '<F7>',
|
|
||||||
F8 = '<F8>',
|
|
||||||
F9 = '<F9>',
|
|
||||||
F10 = '<F10>',
|
|
||||||
F11 = '<F11>',
|
|
||||||
F12 = '<F12>',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spec = { -- document the key chains we know about
|
|
||||||
{ '<leader>g', group = 'git' },
|
|
||||||
{ '<leader>s', group = 'search' },
|
|
||||||
{ '<leader>t', group = 'toggle' },
|
|
||||||
{ '<leader>w', group = 'windows' },
|
|
||||||
{ '<leader>l', group = 'lsp' },
|
|
||||||
{ '<leader>wc', group = 'close' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
} }
|
|
||||||
Reference in New Issue
Block a user