parent
9355e683cd
commit
98bc6abde3
|
@ -1,4 +1,6 @@
|
|||
" MIT License. Copyright (c) 2013-2018 Bjorn Neergaard, hallettj et al.
|
||||
" This comes from the Languageclient plugin:
|
||||
" https://github.com/autozimu/LanguageClient-neovim
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
scriptencoding utf-8
|
||||
|
@ -25,8 +27,11 @@ function! s:languageclient_refresh()
|
|||
endfunction
|
||||
|
||||
function! s:record_diagnostics(state)
|
||||
let result = json_decode(a:state.result)
|
||||
let s:diagnostics = result.diagnostics
|
||||
" The returned message might not have the 'result' key
|
||||
if has_key(a:state, 'result')
|
||||
let result = json_decode(a:state.result)
|
||||
let s:diagnostics = result.diagnostics
|
||||
endif
|
||||
call s:languageclient_refresh()
|
||||
endfunction
|
||||
|
||||
|
|
Loading…
Reference in New Issue