From f931d0d29f994564d9033e49e8a427a9b5e45c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Jan=20Niemier?= Date: Wed, 25 Dec 2019 22:00:02 +0100 Subject: [PATCH] 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 --- autoload/lsp/ui/vim/diagnostics.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/lsp/ui/vim/diagnostics.vim b/autoload/lsp/ui/vim/diagnostics.vim index e6be5d247..ed534e459 100644 --- a/autoload/lsp/ui/vim/diagnostics.vim +++ b/autoload/lsp/ui/vim/diagnostics.vim @@ -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