Skip to content

Commit a34a00b

Browse files
committed
update which-key
1 parent fcc054d commit a34a00b

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

init.lua

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ require('lazy').setup({
121121
config = {
122122
capabilities = nil,
123123
},
124-
exe = vim.fs.joinpath(vim.fn.stdpath 'data' --[[@as string]], 'roslyn', 'Microsoft.CodeAnalysis.LanguageServer.dll'),
124+
exe = {
125+
'dotnet',
126+
vim.fs.joinpath(vim.fn.stdpath 'data', 'roslyn', 'Microsoft.CodeAnalysis.LanguageServer.dll'),
127+
},
125128
-- NOTE: Set `filewatching` to false if you experience performance problems.
126129
-- Defaults to true, since turning it off is a hack.
127130
-- If you notice that the server is _super_ slow, it is probably because of file watching
@@ -177,21 +180,27 @@ require('lazy').setup({
177180
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
178181
config = function() -- This is the function that runs, AFTER loading
179182
require('which-key').setup()
180-
181183
-- Document existing key chains
182-
require('which-key').register {
183-
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
184-
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
185-
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
186-
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
187-
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
188-
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
189-
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
184+
require('which-key').add {
185+
{ '<leader>c', group = '[C]ode' },
186+
{ '<leader>c_', hidden = true },
187+
{ '<leader>d', group = '[D]ocument' },
188+
{ '<leader>d_', hidden = true },
189+
{ '<leader>h', group = 'Git [H]unk' },
190+
{ '<leader>h_', hidden = true },
191+
{ '<leader>r', group = '[R]ename' },
192+
{ '<leader>r_', hidden = true },
193+
{ '<leader>s', group = '[S]earch' },
194+
{ '<leader>s_', hidden = true },
195+
{ '<leader>t', group = '[T]oggle' },
196+
{ '<leader>t_', hidden = true },
197+
{ '<leader>w', group = '[W]orkspace' },
198+
{ '<leader>w_', hidden = true },
190199
}
191200
-- visual mode
192-
require('which-key').register({
193-
['<leader>h'] = { 'Git [H]unk' },
194-
}, { mode = 'v' })
201+
require('which-key').add {
202+
{ '<leader>h', desc = 'Git [H]unk', mode = 'v' },
203+
}
195204
end,
196205
},
197206

0 commit comments

Comments
 (0)