From bfc79bd2aafffc9b8590f9ffa68254243e3f808a Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 12 May 2019 19:35:10 +0100 Subject: #2492 - Try to fix a deoplete bug again --- autoload/ale/completion.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'autoload') 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 -- cgit v1.2.3