]> Sergey Matveev's repositories - dotfiles.git/blob - vim/.vim/pack/stargrave/start/lsp/autoload/mylsp.vim
e64ccc9fc7d973cced030c7b641235df47c9b05d
[dotfiles.git] / vim / .vim / pack / stargrave / start / lsp / autoload / mylsp.vim
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()
4 " endfunction
5
6 function! mylsp#qfpopulate() abort
7     let l = []
8     for d in lsp#ui#vim#diagnostics#get_all_buffer_diagnostics()
9         call add(l, {
10             \"lnum": d["range"]["start"]["line"],
11             \"col": d["range"]["start"]["character"],
12             \"text": d["message"],
13             \"bufnr": bufnr()})
14     endfor
15     call setqflist(l, "r")
16 endfunction