]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Solargraph Ruby language server returns null in the 'detail' field in some completion...
authorYegappan Lakshmanan <yegappan@yahoo.com>
Fri, 7 Apr 2023 14:20:00 +0000 (07:20 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Fri, 7 Apr 2023 14:20:00 +0000 (07:20 -0700)
autoload/lsp/completion.vim

index 4d04190e0ae879f47f8e7681e64dde5adc12daf6..4c83d03b7157333f8d1bb28d2eaf5088ab960bc6 100644 (file)
@@ -269,7 +269,7 @@ export def CompletionResolveReply(lspserver: dict<any>, cItem: any)
   var infoText: list<string>
   var infoKind: string
 
-  if cItem->has_key('detail')
+  if cItem->has_key('detail') && !cItem.detail->empty()
     # Solve a issue where if a server send the detail field with "\n",
     # on the completion popup, everything will be joined with "^@"
     # (example: typescript-language-server)