1 " That function requires vim-lsp/autoload/lsp/ui/vim/diagnostics.vim:
2 " function! lsp#ui#vim#diagnostics#get_all_buffer_diagnostics(...) abort
3 " return s:get_all_buffer_diagnostics()
6 function! mylsp#qfpopulate() abort
8 for d in lsp#ui#vim#diagnostics#get_all_buffer_diagnostics()
10 \"lnum": d["range"]["start"]["line"],
11 \"col": d["range"]["start"]["character"],
12 \"text": d["message"],
15 call setqflist(l, "r")