]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/pack/stargrave/start/lsp/autoload/mylsp.vim
Various Vim plugins separated on packages
[dotfiles.git] / vim / .vim / pack / stargrave / start / lsp / autoload / mylsp.vim
diff --git a/vim/.vim/pack/stargrave/start/lsp/autoload/mylsp.vim b/vim/.vim/pack/stargrave/start/lsp/autoload/mylsp.vim
new file mode 100644 (file)
index 0000000..42b05ad
--- /dev/null
@@ -0,0 +1,11 @@
+function! mylsp#qfpopulate() abort
+    let l = []
+    for d in lsp#ui#vim#diagnostics#get_all_buffer_diagnostics()
+        call add(l, {
+            \"lnum": d["range"]["start"]["line"],
+            \"col": d["range"]["start"]["character"],
+            \"text": d["message"],
+            \"bufnr": bufnr()})
+    endfor
+    call setqflist(l, "r")
+endfunction