Use location list instead of quickfix for diagnostics (#335)

Diagnostics are enabled only for current document which makes it
pointless to feed them to the QuickFix which is global. This PR changes
that behaviour to use location list, which is window-local, instead.

Close #75
This commit is contained in:
Łukasz Jan Niemier
2019-12-25 22:00:02 +01:00
committed by Prabir Shrestha
parent 6c97746d66
commit f931d0d29f

View File

@@ -39,7 +39,7 @@ function! lsp#ui#vim#diagnostics#document_diagnostics() abort
let l:result += lsp#ui#vim#utils#diagnostics_to_loc_list(l:data)
endfor
call setqflist(l:result)
call setloclist(0, l:result)
" autocmd FileType qf setlocal wrap
@@ -47,7 +47,7 @@ function! lsp#ui#vim#diagnostics#document_diagnostics() abort
call lsp#utils#error('No diagnostics results found')
else
echo 'Retrieved diagnostics results'
botright copen
botright lopen
endif
endfunction