diff --git a/lsp-ui-doc.el b/lsp-ui-doc.el index 810a46a4..3668a825 100644 --- a/lsp-ui-doc.el +++ b/lsp-ui-doc.el @@ -262,7 +262,7 @@ We don't extract the string that `lps-line' is already displaying." (when contents (cond ((stringp contents) contents) - ((listp contents) ;; MarkedString[] + ((sequencep contents) ;; MarkedString[] (mapconcat 'lsp-ui-doc--extract-marked-string (lsp-ui-doc--filter-marked-string contents) "\n\n" diff --git a/lsp-ui-sideline.el b/lsp-ui-sideline.el index e57800d6..f61e43c8 100644 --- a/lsp-ui-sideline.el +++ b/lsp-ui-sideline.el @@ -200,10 +200,10 @@ function signature)." (when contents (cond ((stringp contents) contents) - ((listp contents) ;; MarkedString[] - (--first (and (hash-table-p it) - (lsp-ui-sideline--get-renderer (gethash "language" it))) - contents)) + ((sequencep contents) ;; MarkedString[] + (seq-find (lambda (it) (and (hash-table-p it) + (lsp-ui-sideline--get-renderer (gethash "language" it)))) + contents)) ((gethash "kind" contents) (gethash "value" contents)) ;; MarkupContent ((gethash "language" contents) ;; MarkedString (and (lsp-ui-sideline--get-renderer (gethash "language" contents)) @@ -350,7 +350,7 @@ CURRENT is non-nil when the point is on the symbol." (defun lsp-ui-sideline--code-actions (actions) "Show code ACTIONS." (setq lsp-ui-sideline--code-actions actions) - (dolist (action actions) + (seq-doseq (action actions) (-let* ((title (->> (gethash "title" action) (replace-regexp-in-string "[\n\t ]+" " ") (concat lsp-ui-sideline-code-actions-prefix)))