mirror of
https://github.com/prabirshrestha/vim-lsp.git
synced 2025-12-14 20:35:59 +01:00
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:
committed by
Prabir Shrestha
parent
6c97746d66
commit
f931d0d29f
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user