Skip to content

Commit

Permalink
Use location list instead of quickfix for diagnostics (#335)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hauleth authored and prabirshrestha committed Dec 25, 2019
1 parent 6c97746 commit f931d0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/lsp/ui/vim/diagnostics.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ 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

if empty(l:result)
call lsp#utils#error('No diagnostics results found')
else
echo 'Retrieved diagnostics results'
botright copen
botright lopen
endif
endfunction

Expand Down

0 comments on commit f931d0d

Please # to comment.