Skip to content

Commit

Permalink
Fix which-key delay settings (nvim-lua#1276)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jensenr30 authored and Fabio Strozzi committed Jan 17, 2025
1 parent 5b27c91 commit 382e5b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 250

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

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

0 comments on commit 382e5b4

Please sign in to comment.