Skip to content

Commit

Permalink
listp -> sequencep
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Sep 10, 2018
1 parent 564840a commit 975df29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lsp-ui-doc.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions lsp-ui-sideline.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit 975df29

Please sign in to comment.