2024-03-18 17:50:47 +00:00
|
|
|
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
2024-02-26 19:46:46 +00:00
|
|
|
--
|
|
|
|
-- This is often very useful to both group configuration, as well as handle
|
|
|
|
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
|
|
|
--
|
|
|
|
-- For example, in the following configuration, we use:
|
2024-03-03 08:54:58 +00:00
|
|
|
-- event = 'VimEnter'
|
2024-02-26 19:46:46 +00:00
|
|
|
--
|
2024-03-03 08:54:58 +00:00
|
|
|
-- which loads which-key before all the UI elements are loaded. Events can be
|
2024-03-01 22:11:08 +00:00
|
|
|
-- normal autocommands events (`:help autocmd-events`).
|
2024-02-26 19:46:46 +00:00
|
|
|
--
|
|
|
|
-- Then, because we use the `config` key, the configuration only runs
|
|
|
|
-- after the plugin has been loaded:
|
|
|
|
-- config = function() ... end
|
|
|
|
|
|
|
|
return {
|
|
|
|
{ -- Useful plugin to show you pending keybinds.
|
|
|
|
'folke/which-key.nvim',
|
2024-03-03 08:54:58 +00:00
|
|
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
2024-08-26 20:15:38 +00:00
|
|
|
opts = {
|
|
|
|
icons = {
|
|
|
|
-- set icon mappings to true if you have a Nerd Font
|
|
|
|
mappings = vim.g.have_nerd_font,
|
|
|
|
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
|
|
|
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
|
|
|
|
keys = vim.g.have_nerd_font and {} or {
|
|
|
|
Up = '<Up> ',
|
|
|
|
Down = '<Down> ',
|
|
|
|
Left = '<Left> ',
|
|
|
|
Right = '<Right> ',
|
|
|
|
C = '<C-…> ',
|
|
|
|
M = '<M-…> ',
|
|
|
|
D = '<D-…> ',
|
|
|
|
S = '<S-…> ',
|
|
|
|
CR = '<CR> ',
|
|
|
|
Esc = '<Esc> ',
|
|
|
|
ScrollWheelDown = '<ScrollWheelDown> ',
|
|
|
|
ScrollWheelUp = '<ScrollWheelUp> ',
|
|
|
|
NL = '<NL> ',
|
|
|
|
BS = '<BS> ',
|
|
|
|
Space = '<Space> ',
|
|
|
|
Tab = '<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>',
|
2024-08-23 12:22:13 +00:00
|
|
|
},
|
2024-02-26 19:46:46 +00:00
|
|
|
|
2024-08-26 20:15:38 +00:00
|
|
|
-- Document existing key chains
|
|
|
|
spec = {
|
|
|
|
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
|
|
|
{ '<leader>d', group = '[D]ocument' },
|
|
|
|
{ '<leader>r', group = '[R]ename' },
|
|
|
|
{ '<leader>s', group = '[S]earch' },
|
|
|
|
{ '<leader>w', group = '[W]orkspace' },
|
|
|
|
{ '<leader>t', group = '[T]oggle' },
|
|
|
|
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-02-26 19:46:46 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
-- vim: ts=2 sts=2 sw=2 et
|