]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Show information about all servers running for a buffer in ":LspShowAllServers"
authorAndreas Louv <andreas@louv.dk>
Thu, 13 Apr 2023 18:51:43 +0000 (20:51 +0200)
committerAndreas Louv <andreas@louv.dk>
Fri, 14 Apr 2023 02:13:55 +0000 (04:13 +0200)
autoload/lsp/lsp.vim

index 5f4d05253e420a9ebddaab583c577174ceaa87a6..4e453df9350b867251a07aefaa4d06cfe95abcc2 100644 (file)
@@ -132,11 +132,13 @@ export def ShowAllServers()
   lines->add('Buffer Information')
   lines->add('==================')
   for bnr in range(1, bufnr('$'))
-    if buf.BufHasLspServer(bnr)
+    var lspservers: list<dict<any>> = buf.BufLspServersGet(bnr)
+    if !lspservers->empty()
       lines->add($"Buffer: '{bufname(bnr)}'")
-      var lspserver = buf.BufLspServerGet(bnr)
-      lines->add($"Server Path: '{lspserver.path}'")
-      lines->add($"Status: {lspserver.running ? 'Running' : 'Not running'}")
+      for lspserver in lspservers
+        lines->add($"Server Path: '{lspserver.path}'")
+        lines->add($"Status: {lspserver.running ? 'Running' : 'Not running'}")
+      endfor
       lines->add('')
     endif
   endfor