1
0
mirror of https://github.com/amix/vimrc synced 2025-07-09 10:45:00 +08:00

plugin updates

plugin updates
This commit is contained in:
Geezus
2019-05-16 14:44:54 -05:00
parent e73d906a54
commit 8649b3bf27
163 changed files with 1376 additions and 3542 deletions

View File

@ -28,7 +28,7 @@ let s:Event = 23
let s:Operator = 24
let s:TypeParameter = 25
function! go#lsp#completionitemkind#Vim(kind) abort
function! go#lsp#completionitemkind#Vim(kind)
if a:kind == s:Method || a:kind == s:Function || a:kind == s:Constructor
return 'f'
elseif a:kind == s:Variable || a:kind == s:Constant
@ -40,22 +40,6 @@ function! go#lsp#completionitemkind#Vim(kind) abort
endif
endfunction
function! go#lsp#completionitemkind#IsFunction(kind) abort
if a:kind == s:Function
return 1
endif
return 0
endfunction
function! go#lsp#completionitemkind#IsMethod(kind) abort
if a:kind == s:Method
return 1
endif
return 0
endfunction
" restore Vi compatibility settings
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -2,7 +2,7 @@
let s:cpo_save = &cpo
set cpo&vim
function! go#lsp#message#Initialize(wd) abort
function! go#lsp#message#Initialize(wd)
return {
\ 'notification': 0,
\ 'method': 'initialize',
@ -11,17 +11,13 @@ function! go#lsp#message#Initialize(wd) abort
\ 'rootUri': go#path#ToURI(a:wd),
\ 'capabilities': {
\ 'workspace': {},
\ 'textDocument': {
\ 'hover': {
\ 'contentFormat': ['plaintext'],
\ },
\ }
\ 'textDocument': {}
\ }
\ }
\ }
endfunction
function! go#lsp#message#Definition(file, line, col) abort
function! go#lsp#message#Definition(file, line, col)
return {
\ 'notification': 0,
\ 'method': 'textDocument/definition',
@ -34,7 +30,8 @@ function! go#lsp#message#Definition(file, line, col) abort
\ }
endfunction
function! go#lsp#message#TypeDefinition(file, line, col) abort
function! go#lsp#message#TypeDefinition(file, line, col)
return {
\ 'notification': 0,
\ 'method': 'textDocument/typeDefinition',
@ -47,7 +44,7 @@ function! go#lsp#message#TypeDefinition(file, line, col) abort
\ }
endfunction
function! go#lsp#message#DidOpen(file, content) abort
function! go#lsp#message#DidOpen(file, content)
return {
\ 'notification': 1,
\ 'method': 'textDocument/didOpen',
@ -61,7 +58,7 @@ function! go#lsp#message#DidOpen(file, content) abort
\ }
endfunction
function! go#lsp#message#DidChange(file, content) abort
function! go#lsp#message#DidChange(file, content)
return {
\ 'notification': 1,
\ 'method': 'textDocument/didChange',
@ -78,7 +75,7 @@ function! go#lsp#message#DidChange(file, content) abort
\ }
endfunction
function! go#lsp#message#DidClose(file) abort
function! go#lsp#message#DidClose(file)
return {
\ 'notification': 1,
\ 'method': 'textDocument/didClose',
@ -90,7 +87,7 @@ function! go#lsp#message#DidClose(file) abort
\ }
endfunction
function! go#lsp#message#Completion(file, line, col) abort
function! go#lsp#message#Completion(file, line, col)
return {
\ 'notification': 0,
\ 'method': 'textDocument/completion',
@ -103,20 +100,7 @@ function! go#lsp#message#Completion(file, line, col) abort
\ }
endfunction
function! go#lsp#message#Hover(file, line, col) abort
return {
\ 'notification': 0,
\ 'method': 'textDocument/hover',
\ 'params': {
\ 'textDocument': {
\ 'uri': go#path#ToURI(a:file)
\ },
\ 'position': s:position(a:line, a:col),
\ }
\ }
endfunction
function! s:position(line, col) abort
function! s:position(line, col)
return {'line': a:line - 1, 'character': a:col-1}
endfunction