Skip to content

Feat: Add configurable timeouts for manual and auto completion - #17967

Closed
girishji wants to merge 5 commits into
vim:masterfrom
girishji:tmouts
Closed

girishji wants to merge 5 commits into
vim:masterfrom
girishji:tmouts

Conversation

@girishji

@girishji girishji commented Aug 11, 2025 •

Copy link
Copy Markdown
Contributor

Add 'autocompletetimeout' and 'completetimeout' options

This affects both automatic completion ('autocomplete') and manual completion (i_CTRL-N, i_CTRL-P).

Addresses #17908

					*'autocompletetimeout'* *'act'*
'autocompletetimeout' 'act'	number	(default 80)
				            global
	Initial timeout (in milliseconds) for the decaying time-sliced
	completion algorithm.  Starts at this value, halves for each slower
	source until a minimum is reached.  All sources run, but slower ones
	are quickly de-prioritized.  The default is tuned so the popup menu
	opens within ~200ms even with multiple slow sources on a slow system.
	Changing this value is rarely needed.  Only values >80 are valid.
	Special case: when 'complete' contains "F" or "o" (function sources),
	a longer timeout is used, allowing up to ~1s for sources such as LSP
	servers that may sometimes take longer (e.g., while loading modules).
	See |ins-autocompletion|.

					*'completetimeout'* *'cto'*
'completetimeout' 'cto'	number	(default 0)
			            global
	Like 'autocompletetimeout', but applies to |i_CTRL-N| and |i_CTRL-P|
	completion.  Value of 0 disables the timeout; positive values allowed.

Comment thread src/insexpand.c
Comment thread runtime/doc/options.txt
Add 'autocompletetimeout' and 'completetimeout' options

This affect both automatic completion ('autocomplete') and manual completion
(i_CTRL-N, i_CTRL-P).

Fixes vim#17908
@girishji

Copy link
Copy Markdown
Contributor Author

@chrisbra Is there anything else that needs to be done for this?

@chrisbra

Copy link
Copy Markdown
Member

sorry, too much going on here at work and with my family, so I haven't had a chance to re-look at it. I suppose the change to diff.pro is unrelated, so I'll drop it. Thanks

@chrisbra chrisbra closed this in 69a337e Aug 23, 2025
@girishji

Copy link
Copy Markdown
Contributor Author

No worries, thanks.

@girishji
girishji deleted the tmouts branch August 23, 2025 16:08
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Aug 24, 2025
Problem:  completion: cannot add timeouts for 'cpt' sources
          (Evgeni Chasnovski)
Solution: Add the 'autocompletetimeout' and 'completetimeout' options
          (Girish Palya)

fixes: vim/vim#17908
closes: vim/vim#17967

vim/vim@69a337e

Co-authored-by: Girish Palya <[email protected]>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Aug 24, 2025
Problem:  completion: cannot add timeouts for 'cpt' sources
          (Evgeni Chasnovski)
Solution: Add the 'autocompletetimeout' and 'completetimeout' options
          (Girish Palya)

fixes: vim/vim#17908
closes: vim/vim#17967

vim/vim@69a337e

Co-authored-by: Girish Palya <[email protected]>
zeertzjq added a commit to neovim/neovim that referenced this pull request Aug 24, 2025
…#35447)

Problem:  completion: cannot add timeouts for 'cpt' sources
          (Evgeni Chasnovski)
Solution: Add the 'autocompletetimeout' and 'completetimeout' options
          (Girish Palya)

fixes: vim/vim#17908
closes: vim/vim#17967

vim/vim@69a337e

Co-authored-by: Girish Palya <[email protected]>
@h-east

h-east commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

sorry, too much going on here at work and with my family, so I haven't had a chance to re-look at it. I suppose the change to diff.pro is unrelated, so I'll drop it. Thanks

Unfortunately, it seems that the changes in diff.pro are included in the patch 9.1.1672 as is.

sahinf pushed a commit to sahinf/vim that referenced this pull request Sep 7, 2025
Problem:  completion: cannot add timeouts for 'cpt' sources
          (Evgeni Chasnovski)
Solution: Add the 'autocompletetimeout' and 'completetimeout' options
          (Girish Palya)

fixes: vim#17908
closes: vim#17967

Signed-off-by: Girish Palya <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
dundargoc pushed a commit to dundargoc/neovim that referenced this pull request Sep 27, 2025
…neovim#35447)

Problem:  completion: cannot add timeouts for 'cpt' sources
          (Evgeni Chasnovski)
Solution: Add the 'autocompletetimeout' and 'completetimeout' options
          (Girish Palya)

fixes: vim/vim#17908
closes: vim/vim#17967

vim/vim@69a337e

Co-authored-by: Girish Palya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants