Skip to content

Commit

Permalink
Refactor cider-clojuredocs to use cider-docstring--format
Browse files Browse the repository at this point in the history
  • Loading branch information
katomuso authored and bbatsov committed Jun 11, 2024
1 parent 738f393 commit 39ed671
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cider-clojuredocs.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@

;;; Code:

(require 'subr-x)
(require 'url-vars)

(require 'cider-client)
(require 'cider-common)
(require 'subr-x)
(require 'cider-docstring)
(require 'cider-popup)
(require 'cider-util)

(require 'nrepl-dict)

(require 'url-vars)

(defconst cider-clojuredocs-url "https://clojuredocs.org/")

(defconst cider-clojuredocs-buffer "*cider-clojuredocs*")
Expand Down Expand Up @@ -120,10 +120,7 @@ opposite of what that option dictates."
(insert (format " [%s]\n" arglist)))
(newline))
(when-let* ((doc (nrepl-dict-get dict "doc"))
;; As this is a literal docstring from the source code and
;; there are two spaces at the beginning of lines in docstrings,
;; we remove them to make it align nicely in ClojureDocs buffer.
(doc (replace-regexp-in-string "\n " "\n" doc)))
(doc (cider-docstring--format doc)))
(insert doc "\n")
(newline)))

Expand Down

0 comments on commit 39ed671

Please sign in to comment.