From e0391f2cba9666521de76d49ba96e8be6841d8b6 Mon Sep 17 00:00:00 2001
From: Andreas Louv <andreas@louv.dk>
Date: Tue, 4 Apr 2023 00:05:14 +0200
Subject: [PATCH] Add error tracing when hover reply parsing fails

---
 autoload/lsp/hover.vim | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/autoload/lsp/hover.vim b/autoload/lsp/hover.vim
index 2069852..b5dc50f 100644
--- a/autoload/lsp/hover.vim
+++ b/autoload/lsp/hover.vim
@@ -22,6 +22,10 @@ def GetHoverText(hoverResult: any): list<any>
       return [hoverResult.contents.value->split("\n"), 'lspgfm']
     endif
 
+    util.TraceLog(
+      true,
+      $'{strftime("%m/%d/%y %T")}: Unsupported hover contents kind ({hoverResult.contents.kind})'
+    )
     return ['', '']
   endif
 
@@ -61,6 +65,10 @@ def GetHoverText(hoverResult: any): list<any>
     return [hoverText, 'lspgfm']
   endif
 
+  util.TraceLog(
+    true,
+    $'{strftime("%m/%d/%y %T")}: Unsupported hover reply ({hoverResult})'
+  )
   return ['', '']
 enddef
 
-- 
2.51.0