diff options
Diffstat (limited to 'rplugin/python3/deoplete/sources/ale.py')
-rw-r--r-- | rplugin/python3/deoplete/sources/ale.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rplugin/python3/deoplete/sources/ale.py b/rplugin/python3/deoplete/sources/ale.py index 55121d76..7ed2f6c0 100644 --- a/rplugin/python3/deoplete/sources/ale.py +++ b/rplugin/python3/deoplete/sources/ale.py @@ -30,6 +30,10 @@ class Source(Base): return self.vim.call('ale#completion#GetCompletionPosition') def gather_candidates(self, context): + # Stop early if ALE can't provide completion data for this buffer. + if not self.vim.call('ale#completion#CanProvideCompletions'): + return None + if context.get('is_refresh'): context['is_async'] = False @@ -47,4 +51,4 @@ class Source(Base): # Request some completion results. self.vim.call('ale#completion#GetCompletions', 'deoplete') - return None + return [] |