Skip to content

Commit 70b0566

Browse files
committed
Fix which-key delay settings
The which-key plugin used to rely on vim.opt.timeoutlen, but it was updated a few months ago to use its own opt.delay instead. https://github.com/folke/which-key.nvim/blob/8ab96b38a2530eacba5be717f52e04601eb59326/NEWS.md?plain=1#L10 I set which-key's delay to 0 ms because it makes it feel snappy and responsive! That way, we give new users a good first impression.
1 parent de44f49 commit 70b0566

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ vim.opt.signcolumn = 'yes'
135135
vim.opt.updatetime = 250
136136

137137
-- Decrease mapped sequence wait time
138-
-- Displays which-key popup sooner
139138
vim.opt.timeoutlen = 300
140139

141140
-- Configure how new splits should be opened
@@ -274,6 +273,9 @@ require('lazy').setup({
274273
'folke/which-key.nvim',
275274
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
276275
opts = {
276+
-- delay between pressing a key and opening which-key (milliseconds)
277+
-- this setting is independent of vim.opt.timeoutlen
278+
delay = 0,
277279
icons = {
278280
-- set icon mappings to true if you have a Nerd Font
279281
mappings = vim.g.have_nerd_font,

0 commit comments

Comments
 (0)