Skip to content

Commit eba5286

Browse files
committed
Add flavor support for inf-clojure-completion-command
1 parent 77e43a0 commit eba5286

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
@@ -586,6 +586,19 @@ If you are using flavors, it will pickup the most approapriate
586586
"Command to query inferior Clojure for completion candidates."
587587
:type 'string)
588588

589+
(defcustom inf-clojure-completion-command-lumo
590+
"(doall (map str (lumo.repl/get-completions \"%s\")))\n"
591+
"Lumo command to query inferior Clojure for completion candidates."
592+
:type 'string)
593+
594+
(defun inf-clojure-completion-form ()
595+
"Return the form to query inferior Clojure for a var's documentation.
596+
If you are using flavors, it will pickup the most approapriate
597+
`inf-clojure-completion-command` variant."
598+
(pcase inf-clojure-repl-flavor
599+
(lumo inf-clojure-completion-command-lumo)
600+
(_ inf-clojure-completion-command)))
601+
589602
(defcustom inf-clojure-ns-vars-command
590603
"(clojure.repl/dir %s)\n"
591604
"Command to show the public vars in a namespace."
@@ -750,7 +763,7 @@ See variable `inf-clojure-buffer'."
750763
(unwind-protect
751764
(let ((completion-snippet
752765
(format
753-
inf-clojure-completion-command (substring-no-properties expr))))
766+
(inf-clojure-completion-form) (substring-no-properties expr))))
754767
(process-send-string proc completion-snippet)
755768
(while (and (not (string-match inf-clojure-prompt kept))
756769
(accept-process-output proc 2)))

0 commit comments

Comments
 (0)