All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 unlet! b:ale_completion_info
3 unlet! b:ale_completion_result
7 runtime autoload/ale/lsp_linter.vim
9 function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
13 function! SetCompletionResult(...) abort
14 let b:ale_completion_result = ['foo']
17 function! SetCompletionResponse(...) abort
18 let b:ale_completion_result = ['foo']
22 unlet! b:ale_completion_info
23 unlet! b:ale_completion_result
26 delfunction SetCompletionResult
27 delfunction SetCompletionResponse
29 runtime autoload/ale/lsp_linter.vim
31 call ale#linter#Reset()
38 Execute(-3 should be returned when completion results cannot be requested):
39 AssertEqual -3, ale#completion#OmniFunc(1, '')
41 Execute(The start position should be returned when results can be requested):
43 call setpos('.', [bufnr(''), 3, 14, 0])
45 AssertEqual 11, ale#completion#OmniFunc(1, '')
47 Execute(The omnifunc function should return async results):
48 " Neovim struggles at running these tests.
50 call timer_start(0, function('SetCompletionResult'))
52 AssertEqual ['foo'], ale#completion#OmniFunc(0, '')
55 Execute(The omnifunc function should parse and return async responses):
57 call timer_start(0, function('SetCompletionResponse'))
59 AssertEqual ['foo'], ale#completion#OmniFunc(0, '')