Skip to content

Commit 903503b

Browse files
committed
Add flavor support for
1 parent 285c77e commit 903503b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

inf-clojure.el

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,19 @@ If you are using flavors, it will pickup the most approapriate
599599
"Command to query inferior Clojure for completion candidates."
600600
:type 'string)
601601

602+
(defcustom inf-clojure-completion-command-lumo
603+
"(doall (map str (lumo.repl/get-completions \"%s\")))"
604+
"Lumo command to query inferior Clojure for completion candidates."
605+
:type 'string)
606+
607+
(defun inf-clojure-completion-form ()
608+
"Return the form to query inferior Clojure for a var's documentation.
609+
If you are using flavors, it will pickup the most approapriate
610+
`inf-clojure-completion-command` variant."
611+
(pcase inf-clojure-repl-flavor
612+
(lumo inf-clojure-completion-command-lumo)
613+
(_ inf-clojure-completion-command)))
614+
602615
(defcustom inf-clojure-ns-vars-command
603616
"(clojure.repl/dir %s)\n"
604617
"Command to show the public vars in a namespace."
@@ -778,7 +791,7 @@ See variable `inf-clojure-buffer'."
778791
(unwind-protect
779792
(let ((completion-snippet
780793
(format
781-
inf-clojure-completion-command (substring-no-properties expr))))
794+
inf-clojure-completion-form (substring-no-properties expr))))
782795
(process-send-string proc completion-snippet)
783796
(while (and (not (string-match inf-clojure-prompt kept))
784797
(accept-process-output proc 2)))

0 commit comments

Comments
 (0)