summaryrefslogtreecommitdiff
path: root/autoload
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 /autoload
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 'autoload')
-rw-r--r--autoload/ale/completion.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index ee156056..284b1e08 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -215,6 +215,10 @@ function! ale#completion#GetCompletionPosition() abort
return l:column - len(l:match) - 1
endfunction
+function! ale#completion#GetCompletionPositionForDeoplete(input) abort
+ return match(a:input, '\k*$')
+endfunction
+
function! ale#completion#GetCompletionResult() abort
if exists('b:ale_completion_result')
return b:ale_completion_result