* 3.17

* PositionEncodingKind

* Implement PositionEncodingKind

* Remove luarc.json
This commit is contained in:
hrsh7th
2022-11-16 01:27:15 +09:00
committed by GitHub
parent aee40113c2
commit e820335208
9 changed files with 353 additions and 94 deletions

View File

@@ -6,7 +6,16 @@ let s:sources = {}
"
function! cmp#register_source(name, source) abort
let l:methods = []
for l:method in ['is_available', 'get_debug_name', 'get_trigger_characters', 'get_keyword_pattern', 'complete', 'execute', 'resolve']
for l:method in [
\ 'is_available',
\ 'get_debug_name',
\ 'get_position_encoding_kind',
\ 'get_trigger_characters',
\ 'get_keyword_pattern',
\ 'complete',
\ 'execute',
\ 'resolve'
\ ]
if has_key(a:source, l:method) && type(a:source[l:method]) == v:t_func
call add(l:methods, l:method)
endif
@@ -39,6 +48,8 @@ function! cmp#_method(bridge_id, method, args) abort
return l:source[a:method]()
elseif a:method ==# 'get_debug_name'
return l:source[a:method]()
elseif a:method ==# 'get_position_encoding_kind'
return l:source[a:method](a:args[0])
elseif a:method ==# 'get_keyword_pattern'
return l:source[a:method](a:args[0])
elseif a:method ==# 'get_trigger_characters'