|
1 | | -return { |
| 1 | +return |
| 2 | +{ |
2 | 3 | -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). |
3 | 4 | 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically |
4 | 5 |
|
@@ -48,28 +49,58 @@ return { |
48 | 49 | -- config = function() ... end |
49 | 50 |
|
50 | 51 | { -- Useful plugin to show you pending keybinds. |
51 | | - 'folke/which-key.nvim', |
52 | | - event = 'VimEnter', -- Sets the loading event to 'VimEnter' |
53 | | - config = function() -- This is the function that runs, AFTER loading |
54 | | - require('which-key').setup() |
55 | | - |
56 | | - -- Document existing key chains |
57 | | - require('which-key').register { |
58 | | - ['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' }, |
59 | | - ['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, |
60 | | - ['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' }, |
61 | | - ['<leader>f'] = { name = '[S]earch', _ = 'which_key_ignore' }, |
62 | | - ['<leader>p'] = { name = '[P]roject-Workspace', _ = 'which_key_ignore' }, |
63 | | - ['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, |
64 | | - ['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, |
65 | | - ['<leader>w'] = { name = '[W]indow', _ = 'which_key_ignore' }, |
66 | | - } |
67 | | - -- visual mode |
68 | | - require('which-key').register({ |
69 | | - ['<leader>h'] = { 'Git [H]unk' }, |
70 | | - }, { mode = 'v' }) |
71 | | - end, |
| 52 | + 'folke/which-key.nvim', |
| 53 | + event = 'VimEnter', -- Sets the loading event to 'VimEnter' |
| 54 | + opts = { |
| 55 | + icons = { |
| 56 | + -- set icon mappings to true if you have a Nerd Font |
| 57 | + mappings = vim.g.have_nerd_font, |
| 58 | + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the |
| 59 | + -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table |
| 60 | + keys = vim.g.have_nerd_font and {} or { |
| 61 | + Up = '<Up> ', |
| 62 | + Down = '<Down> ', |
| 63 | + Left = '<Left> ', |
| 64 | + Right = '<Right> ', |
| 65 | + C = '<C-…> ', |
| 66 | + M = '<M-…> ', |
| 67 | + D = '<D-…> ', |
| 68 | + S = '<S-…> ', |
| 69 | + CR = '<CR> ', |
| 70 | + Esc = '<Esc> ', |
| 71 | + ScrollWheelDown = '<ScrollWheelDown> ', |
| 72 | + ScrollWheelUp = '<ScrollWheelUp> ', |
| 73 | + NL = '<NL> ', |
| 74 | + BS = '<BS> ', |
| 75 | + Space = '<Space> ', |
| 76 | + Tab = '<Tab> ', |
| 77 | + F1 = '<F1>', |
| 78 | + F2 = '<F2>', |
| 79 | + F3 = '<F3>', |
| 80 | + F4 = '<F4>', |
| 81 | + F5 = '<F5>', |
| 82 | + F6 = '<F6>', |
| 83 | + F7 = '<F7>', |
| 84 | + F8 = '<F8>', |
| 85 | + F9 = '<F9>', |
| 86 | + F10 = '<F10>', |
| 87 | + F11 = '<F11>', |
| 88 | + F12 = '<F12>', |
| 89 | + }, |
| 90 | + }, |
| 91 | + |
| 92 | + -- Document existing key chains |
| 93 | + spec = { |
| 94 | + { '<leader>c', group = '[C]ode', mode = { 'n', 'x' } }, |
| 95 | + { '<leader>d', group = '[D]ocument' }, |
| 96 | + { '<leader>r', group = '[R]ename' }, |
| 97 | + { '<leader>f', group = '[S]earch' }, |
| 98 | + { '<leader>p', group = '[P]roject Workspace' }, |
| 99 | + { '<leader>t', group = '[T]oggle' }, |
| 100 | + { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, |
| 101 | + }, |
72 | 102 | }, |
| 103 | +}, |
73 | 104 |
|
74 | 105 | -- NOTE: Plugins can specify dependencies. |
75 | 106 | -- |
@@ -672,24 +703,5 @@ return { |
672 | 703 | -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. |
673 | 704 | -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` |
674 | 705 | -- { import = 'custom.plugins' }, |
675 | | -}, { |
676 | | - ui = { |
677 | | - -- If you are using a Nerd Font: set icons to an empty table which will use the |
678 | | - -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table |
679 | | - icons = vim.g.have_nerd_font and {} or { |
680 | | - cmd = '⌘', |
681 | | - config = '🛠', |
682 | | - event = '📅', |
683 | | - ft = '📂', |
684 | | - init = '⚙', |
685 | | - keys = '🗝', |
686 | | - plugin = '🔌', |
687 | | - runtime = '💻', |
688 | | - require = '🌙', |
689 | | - source = '📄', |
690 | | - start = '🚀', |
691 | | - task = '📌', |
692 | | - lazy = '💤 ', |
693 | | - }, |
694 | | - }, |
695 | 706 | } |
| 707 | + |
0 commit comments