Skip to content

Commit 1cd7d8c

Browse files
yuhan0bbatsov
authored andcommitted
Extend the default doc xref regexp
To recognize [[var]] syntax and fully qualified symbols as xref links
1 parent 20854fc commit 1cd7d8c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cider-util.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,10 @@ restore it properly when going back."
510510
(if tail (setcdr tail nil))))
511511
(setq help-xref-stack-item item)))
512512

513-
(defcustom cider-doc-xref-regexp "`\\(.*?\\)`"
513+
(defcustom cider-doc-xref-regexp
514+
(rx (or (: "`" (group-n 1 (+ (not space))) "`") ; `var`
515+
(: "[[" (group-n 1 (+ (not space))) "]]") ; [[var]]
516+
(group-n 1 (+ (not space)) "/" (+ (not space))))) ; Fully qualified
514517
"The regexp used to search Clojure vars in doc buffers."
515518
:type 'regexp
516519
:safe #'stringp

0 commit comments

Comments
 (0)