diff --git a/init.lua b/init.lua index 88e11af..0720a6a 100644 --- a/init.lua +++ b/init.lua @@ -214,17 +214,19 @@ require('lazy').setup({ require('which-key').setup() -- Document existing key chains - require('which-key').add { - { - { 'c', group = '[C]ode' }, - { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, - { 's', group = '[S]earch' }, - { 'w', group = '[W]orkspace' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, + require('which-key').register { + ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, + ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, + ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, + ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, + ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, + ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, + ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, } + -- visual mode + require('which-key').register({ + ['h'] = { 'Git [H]unk' }, + }, { mode = 'v' }) end, }, @@ -354,7 +356,7 @@ require('lazy').setup({ -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins -- used for completion, annotations and signatures of Neovim apis - { 'folke/lazydev.nvim', opts = {} }, + { 'folke/neodev.nvim', opts = {} }, }, config = function() -- Brief aside: **What is LSP?** @@ -501,7 +503,6 @@ require('lazy').setup({ gopls = {}, pyright = {}, rust_analyzer = {}, - zls = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: