1
0
mirror of https://github.com/amix/vimrc synced 2025-08-07 06:05:00 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2018-08-25 18:13:42 +02:00
parent 587a185a98
commit 6bd9eda8c3
169 changed files with 2625 additions and 2334 deletions

View File

@ -47,7 +47,23 @@ function! ale#lsp#response#ReadDiagnostics(response) abort
endif
if has_key(l:diagnostic, 'code')
let l:loclist_item.nr = l:diagnostic.code
if type(l:diagnostic.code) == v:t_string
let l:loclist_item.code = l:diagnostic.code
elseif type(l:diagnostic.code) == v:t_number && l:diagnostic.code != -1
let l:loclist_item.code = string(l:diagnostic.code)
let l:loclist_item.nr = l:diagnostic.code
endif
endif
if has_key(l:diagnostic, 'relatedInformation')
let l:related = deepcopy(l:diagnostic.relatedInformation)
call map(l:related, {key, val ->
\ ale#path#FromURI(val.location.uri) .
\ ':' . (val.location.range.start.line + 1) .
\ ':' . (val.location.range.start.character + 1) .
\ ":\n\t" . val.message
\ })
let l:loclist_item.detail = l:diagnostic.message . "\n" . join(l:related, "\n")
endif
call add(l:loclist, l:loclist_item)
@ -70,7 +86,12 @@ function! ale#lsp#response#ReadTSServerDiagnostics(response) abort
\}
if has_key(l:diagnostic, 'code')
let l:loclist_item.nr = l:diagnostic.code
if type(l:diagnostic.code) == v:t_string
let l:loclist_item.code = l:diagnostic.code
elseif type(l:diagnostic.code) == v:t_number && l:diagnostic.code != -1
let l:loclist_item.code = string(l:diagnostic.code)
let l:loclist_item.nr = l:diagnostic.code
endif
endif
if get(l:diagnostic, 'category') is# 'warning'
@ -110,7 +131,7 @@ function! ale#lsp#response#GetErrorMessage(response) abort
if type(l:error_data) is v:t_string
let l:message .= "\n" . l:error_data
else
elseif type(l:error_data) is v:t_dict
let l:traceback = get(l:error_data, 'traceback', [])
if type(l:traceback) is v:t_list && !empty(l:traceback)