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

Update plugins using update_plugins.py

This commit is contained in:
Geezus
2019-07-08 11:44:45 -05:00
parent a25315c274
commit 0502b849ed
115 changed files with 3723 additions and 1662 deletions

View File

@ -10,7 +10,9 @@ function! go#lsp#message#Initialize(wd) abort
\ 'processId': getpid(),
\ 'rootUri': go#path#ToURI(a:wd),
\ 'capabilities': {
\ 'workspace': {},
\ 'workspace': {
\ 'workspaceFolders': v:true,
\ },
\ 'textDocument': {
\ 'hover': {
\ 'contentFormat': ['plaintext'],
@ -21,6 +23,14 @@ function! go#lsp#message#Initialize(wd) abort
\ }
endfunction
function! go#lsp#message#workspaceFolders(dirs) abort
return map(copy(a:dirs), function('s:workspaceFolderToURI', []))
endfunction
function s:workspaceFolderToURI(key, val) abort
return go#path#ToURI(a:val)
endfunction
function! go#lsp#message#Definition(file, line, col) abort
return {
\ 'notification': 0,
@ -116,6 +126,25 @@ function! go#lsp#message#Hover(file, line, col) abort
\ }
endfunction
function! go#lsp#message#AddWorkspaces(dirs) abort
let l:dirs = map(copy(a:dirs), function('s:workspaceFodlerToAddURI', []))
return {
\ 'notification': 1,
\ 'method': 'workspace/didChangeWorkspaceFolders',
\ 'params': {
\ 'event': {
\ 'added': l:dirs,
\ },
\ }
\ }
endfunction
function s:workspaceFolderToAddURI(key, val) abort
return {'uri': go#path#ToURI(a:val), 'name': a:val}
endfunction
function! s:position(line, col) abort
return {'line': a:line - 1, 'character': a:col-1}
endfunction