Fix #1384 - Handle warnings and suggestions for tsserver

This commit is contained in:
w0rp 2018-03-02 20:33:45 +00:00
parent acbe527e15
commit 2c2c7ceb1d
2 changed files with 41 additions and 2 deletions

View file

@ -59,6 +59,14 @@ function! ale#lsp#response#ReadTSServerDiagnostics(response) abort
let l:loclist_item.nr = l:diagnostic.code
endif
if get(l:diagnostic, 'category') is# 'warning'
let l:loclist_item.type = 'W'
endif
if get(l:diagnostic, 'category') is# 'suggestion'
let l:loclist_item.type = 'I'
endif
call add(l:loclist, l:loclist_item)
endfor