Skip to content

Commit e8f3e7b

Browse files
authored
Merge pull request #198 from cpbotha/cpb-fix-markdown-doc
Send markdown hover doc to correct viewer
2 parents 2300e94 + 7633231 commit e8f3e7b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lsp-ui-doc.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ We don't extract the string that `lps-line' is already displaying."
271271
"\n\n"
272272
;; (propertize "\n\n" 'face '(:height 0.4))
273273
))
274+
;; when we get markdown contents, render using emacs gfm-view-mode / markdown-mode
275+
((string= (gethash "kind" contents) "markdown") (lsp-ui-doc--extract-marked-string contents))
274276
((gethash "kind" contents) (gethash "value" contents)) ;; MarkupContent
275277
((gethash "language" contents) ;; MarkedString
276278
(lsp-ui-doc--extract-marked-string contents))))

0 commit comments

Comments
 (0)