* dev

* Improve sync design

* Support buffer local mapping

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* stylua

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* integration

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* update

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp
This commit is contained in:
hrsh7th
2021-08-04 01:07:12 +09:00
committed by GitHub
parent b32a6e7e77
commit d23d3533cf
53 changed files with 4681 additions and 0 deletions

32
autoload/cmp.vim Normal file
View File

@@ -0,0 +1,32 @@
let s:Position = vital#cmp#import('VS.LSP.Position')
let s:TextEdit = vital#cmp#import('VS.LSP.TextEdit')
let s:CompletionItem = vital#cmp#import('VS.LSP.CompletionItem')
"
" cmp#apply_text_edits
"
function! cmp#apply_text_edits(bufnr, text_edits) abort
call s:TextEdit.apply(a:bufnr, a:text_edits)
endfunction
"
" cmp#confirm
"
function! cmp#confirm(args) abort
call s:CompletionItem.confirm({
\ 'suggest_position': s:Position.vim_to_lsp('%', [line('.'), a:args.suggest_offset]),
\ 'request_position': s:Position.vim_to_lsp('%', [line('.'), a:args.request_offset]),
\ 'current_position': s:Position.vim_to_lsp('%', [line('.'), col('.')]),
\ 'current_line': getline('.'),
\ 'completion_item': a:args.completion_item,
\ 'expand_snippet': s:get_expand_snippet(),
\ })
endfunction
"
" get_expand_snippet
"
function! s:get_expand_snippet() abort
return { args -> luaeval('require"cmp"._expand_snippet(_A)', args) }
endfunction