style(init): Modularize entire init.lua
Now each plugin is in it's own seperate file that returns the plugin and it's configs. This makes it simpler for me apply lazy loading to this config. Settings, Keymaps, Yank-highlight are inside kickstart directory within their seperate files.
This commit is contained in:
parent
6215c8b7ba
commit
c0e3bb9036
15 changed files with 585 additions and 587 deletions
24
lua/kickstart/plugins/which-key.lua
Normal file
24
lua/kickstart/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
opts = {},
|
||||
config = function()
|
||||
-- document existing key chains
|
||||
require('which-key').register {
|
||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
||||
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
}
|
||||
-- register which-key VISUAL mode
|
||||
-- required for visual <leader>hs (hunk stage) to work
|
||||
require('which-key').register({
|
||||
['<leader>'] = { name = 'VISUAL <leader>' },
|
||||
['<leader>h'] = { 'Git [H]unk' },
|
||||
}, { mode = 'v' })
|
||||
end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue