Skip to content

Commit be4ddf0

Browse files
committed
Add flavor support for inf-clojure-completion-command
1 parent 632c5d7 commit be4ddf0

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

583+
(defcustom inf-clojure-completion-command-lumo
584+
"(doall (map str (lumo.repl/get-completions \"%s\")))\n"
585+
"Lumo command to query inferior Clojure for completion candidates."
586+
:type 'string)
587+
588+
(defun inf-clojure-completion-form ()
589+
"Return the form to query inferior Clojure for a var's documentation.
590+
If you are using flavors, it will pickup the most approapriate
591+
`inf-clojure-completion-command` variant."
592+
(pcase inf-clojure-repl-flavor
593+
(lumo inf-clojure-completion-command-lumo)
594+
(_ inf-clojure-completion-command)))
595+
583596
(defcustom inf-clojure-ns-vars-command
584597
"(clojure.repl/dir %s)\n"
585598
"Command to show the public vars in a namespace."
@@ -744,7 +757,7 @@ See variable `inf-clojure-buffer'."
744757
(unwind-protect
745758
(let ((completion-snippet
746759
(format
747-
inf-clojure-completion-command (substring-no-properties expr))))
760+
(inf-clojure-completion-form) (substring-no-properties expr))))
748761
(process-send-string proc completion-snippet)
749762
(while (and (not (string-match inf-clojure-prompt kept))
750763
(accept-process-output proc 2)))

0 commit comments

Comments
 (0)