Fix infinite autocompletion loop (#5130)
CI / Build (push) Has been cancelled
CI / Neovim 0.10 Windows (push) Has been cancelled
CI / Neovim 0.12 Windows (push) Has been cancelled
CI / Vim 8.2 Windows (push) Has been cancelled
CI / Vim 9.2 Windows (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Lua (push) Has been cancelled
CI / Neovim 0.10 Linux (push) Has been cancelled
CI / Neovim 0.12 Linux (push) Has been cancelled
CI / Vim 8.2 Linux (push) Has been cancelled
CI / Vim 9.2 Linux (push) Has been cancelled

* Check for timeout while waiting for language server result
* Return empty result if language server has no completion capabilities
* Add test for OmniFunc timeout
* Add documentation for timeout option
This commit is contained in:
Torben
2026-05-28 12:00:09 +02:00
committed by GitHub
parent 2a3af30fb6
commit 399c0ffd64
3 changed files with 33 additions and 0 deletions
@@ -58,3 +58,10 @@ Execute(The omnifunc function should parse and return async responses):
AssertEqual ['foo'], ale#completion#OmniFunc(0, '')
endif
Execute (The omnifunc function should timeout with an error, if no result is returned):
" WARNING: This will lock the whole test-suite, if the timeout does not work!
let g:ale_completion_timeout = 0.2
AssertThrows call ale#completion#OmniFunc(0, '')
AssertEqual 'Vim(echoerr):no result within timeout (0.2s)', g:vader_exception