summaryrefslogtreecommitdiff
path: root/rplugin
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-07-14 10:29:03 +0100
committerGitHub <noreply@github.com>2019-07-14 10:29:03 +0100
commit36a50111b91d05afc4ed92a5b5415d0c5527dc6b (patch)
tree3e79ccf9a7ba8e878685ad10da4af08306cf1d29 /rplugin
parentabb38955d3acd452e37c15e7bae62022d1153859 (diff)
parenta3521de64e8dfc2e8dbfc562fbc73502ba3e09ce (diff)
downloadale-36a50111b91d05afc4ed92a5b5415d0c5527dc6b.zip
Merge pull request #2601 from delphinus/feature/better-completion-for-deoplete
Show more candidates for Deoplete completion
Diffstat (limited to 'rplugin')
-rw-r--r--rplugin/python3/deoplete/sources/ale.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/rplugin/python3/deoplete/sources/ale.py b/rplugin/python3/deoplete/sources/ale.py
index 7f1c1d60..66a09551 100644
--- a/rplugin/python3/deoplete/sources/ale.py
+++ b/rplugin/python3/deoplete/sources/ale.py
@@ -24,10 +24,19 @@ class Source(Base):
self.rank = 1000
self.is_bytepos = True
self.min_pattern_length = 1
+ # Do not forget to update s:trigger_character_map in completion.vim in
+ # updating entries in this map.
+ self.input_patterns = {
+ '_': r'\.\w*$',
+ 'rust': r'(\.|::)\w*$',
+ 'typescript': 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.