diff options
author | w0rp <devw0rp@gmail.com> | 2019-05-12 19:35:10 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-05-12 19:35:10 +0100 |
commit | bfc79bd2aafffc9b8590f9ffa68254243e3f808a (patch) | |
tree | 61b01402125c60ea9ffdfebb67795e0809f736f1 /autoload | |
parent | 7943bfab96ea1ecc169e815f75062cc127192ed8 (diff) | |
download | ale-bfc79bd2aafffc9b8590f9ffa68254243e3f808a.zip |
#2492 - Try to fix a deoplete bug again
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/completion.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index 456fe68a..03cc6471 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -549,6 +549,19 @@ function! s:OnReady(linter, lsp_details) abort endif endfunction +" This function can be called to check if ALE can provide completion data for +" the current buffer. 1 will be returned if there's a potential source of +" completion data ALE can use, and 0 will be returned otherwise. +function! ale#completion#CanProvideCompletions() abort + for l:linter in ale#linter#Get(&filetype) + if !empty(l:linter.lsp) + return 1 + endif + endfor + + return 0 +endfunction + " This function can be used to manually trigger autocomplete, even when " g:ale_completion_enabled is set to false function! ale#completion#GetCompletions(source) abort |