2023-09-06 00:26:45 +02:00
|
|
|
-- Plugins: Editor
|
2023-09-06 01:26:46 +02:00
|
|
|
-- https://github.com/rafi/vim-config
|
2023-09-06 00:26:45 +02:00
|
|
|
|
|
|
|
local is_windows = vim.loop.os_uname().sysname == 'Windows_NT'
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
{
|
|
|
|
'ggandor/leap.nvim',
|
|
|
|
-- stylua: ignore
|
|
|
|
keys = {
|
2023-09-07 17:00:51 +02:00
|
|
|
{ 'gl', '<Plug>(leap-forward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap forward to' },
|
|
|
|
{ 'gL', '<Plug>(leap-backward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap backward to' },
|
|
|
|
{ '<leader>wl', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' }, desc = 'Leap to windows' },
|
2023-09-06 00:26:45 +02:00
|
|
|
},
|
2023-09-06 18:36:47 +02:00
|
|
|
config = function ()
|
|
|
|
local leap = require('leap')
|
|
|
|
leap.opts.case_sensitive = false
|
2023-09-07 18:27:39 +02:00
|
|
|
leap.opts.safe_labels = { 'f', 'n', 'u', 't', 'g', 'ö', 'w', 'b', 'm' }
|
|
|
|
leap.opts.labels = { 'a', 's', 'f', 'n', 'j', 'k', 'r', 'e', 'r', 'm',
|
|
|
|
'ö', 'b', 'v', 'u', 'z', 'w', '2', '3', '4', '5', '6',
|
|
|
|
'7', '8', '9' }
|
2023-09-06 18:36:47 +02:00
|
|
|
end,
|
2023-09-06 00:26:45 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
2023-09-06 19:44:09 +02:00
|
|
|
-- NOTE: THIS SECTION CONTAINS THE PREFIXES!
|
2023-09-06 00:26:45 +02:00
|
|
|
{
|
|
|
|
'folke/which-key.nvim',
|
|
|
|
event = 'VeryLazy',
|
|
|
|
opts = {
|
|
|
|
icons = { separator = ' ' },
|
|
|
|
window = { winblend = 0 },
|
|
|
|
defaults = {
|
|
|
|
mode = { 'n', 'v' },
|
|
|
|
[';'] = { name = '+telescope' },
|
|
|
|
[';d'] = { name = '+lsp/todo' },
|
|
|
|
['g'] = { name = '+goto' },
|
|
|
|
['gz'] = { name = '+surround' },
|
|
|
|
[']'] = { name = '+next' },
|
|
|
|
['['] = { name = '+prev' },
|
|
|
|
['<leader>b'] = { name = '+buffer' },
|
|
|
|
['<leader>c'] = { name = '+code' },
|
|
|
|
['<leader>g'] = { name = '+git' },
|
|
|
|
['<leader>h'] = { name = '+hunks' },
|
2023-09-06 11:47:14 +02:00
|
|
|
['<leader>S'] = { name = '+search' },
|
2023-09-06 00:26:45 +02:00
|
|
|
['<leader>t'] = { name = '+toggle/tools' },
|
|
|
|
['<leader>u'] = { name = '+ui' },
|
|
|
|
['<leader>x'] = { name = '+diagnostics/quickfix' },
|
|
|
|
['<leader>z'] = { name = '+notes' },
|
2023-09-06 11:47:14 +02:00
|
|
|
['<leader>w'] = { name = '+window' },
|
2023-09-06 19:44:09 +02:00
|
|
|
['<leader>f'] = { name = '+formatting' },
|
|
|
|
['<leader>m'] = { name = '+marks/misc' },
|
|
|
|
['<leader>md'] = { name = '+line-diffs' },
|
2023-09-06 00:26:45 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
config = function(_, opts)
|
|
|
|
local wk = require('which-key')
|
|
|
|
wk.setup(opts)
|
|
|
|
wk.register(opts.defaults)
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
}
|