summaryrefslogtreecommitdiff
path: root/rplugin/python3/deoplete
diff options
context:
space:
mode:
Diffstat (limited to 'rplugin/python3/deoplete')
-rw-r--r--rplugin/python3/deoplete/sources/ale.py6
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 []