Skip to content

Commit fdc61f1

Browse files
jensenr30monk3yd
authored andcommitted
Fix which-key delay settings (nvim-lua#1276)
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 d3d54f3 commit fdc61f1

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
@@ -115,7 +115,6 @@ vim.opt.signcolumn = 'yes'
115115
vim.opt.updatetime = 250
116116

117117
-- Decrease mapped sequence wait time
118-
-- Displays which-key popup sooner
119118
vim.opt.timeoutlen = 300
120119

121120
-- Configure how new splits should be opened
@@ -346,6 +345,9 @@ require('lazy').setup({
346345
'folke/which-key.nvim',
347346
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
348347
opts = {
348+
-- delay between pressing a key and opening which-key (milliseconds)
349+
-- this setting is independent of vim.opt.timeoutlen
350+
delay = 0,
349351
icons = {
350352
-- set icon mappings to true if you have a Nerd Font
351353
mappings = vim.g.have_nerd_font,

0 commit comments

Comments
 (0)