summaryrefslogtreecommitdiff
path: root/rplugin
diff options
context:
space:
mode:
authordelphinus <me@delphinus.dev>2019-06-19 13:25:41 +0900
committerdelphinus <me@delphinus.dev>2019-06-19 15:08:24 +0900
commite0f8304860a8db06bca3ec8cdbd58f3852e5e789 (patch)
tree7bb3caf95f62da38448f80e3e251d3f0ec714a59 /rplugin
parentf5a908bf99a45b2602d01e07816aa513459f0197 (diff)
downloadale-e0f8304860a8db06bca3ec8cdbd58f3852e5e789.zip
Add separated func for deoplete
Deoplete needs `get_complete_position` method and it has a different signature. It already fetches the input string and attempts to detect the position with `\k*` regexp patterns.
Diffstat (limited to 'rplugin')
-rw-r--r--rplugin/python3/deoplete/sources/ale.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/rplugin/python3/deoplete/sources/ale.py b/rplugin/python3/deoplete/sources/ale.py
index 98c463e0..653bc4fc 100644
--- a/rplugin/python3/deoplete/sources/ale.py
+++ b/rplugin/python3/deoplete/sources/ale.py
@@ -27,8 +27,10 @@ class Source(Base):
self.input_pattern = r'(\.|::|->)\w*$'
# Returns an integer for the start position, as with omnifunc.
- def get_completion_position(self):
- return self.vim.call('ale#completion#GetCompletionPosition')
+ def get_complete_position(self, context):
+ return self.vim.call(
+ 'ale#completion#GetCompletionPositionForDeoplete', context['input']
+ )
def gather_candidates(self, context):
# Stop early if ALE can't provide completion data for this buffer.