-
-
Notifications
You must be signed in to change notification settings - Fork 45
Fix #56 Add special handling for Planck REPLS #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #56 Add special handling for Planck REPLS #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! minor questions :)
inf-clojure.el
Outdated
@@ -236,7 +237,15 @@ Clojure to load that file." | |||
(define-obsolete-variable-alias 'inf-clojure-load-command 'inf-clojure-load-form "2.0.0") | |||
|
|||
(defcustom inf-clojure-load-form-lumo "(clojure.core/load-file \"%s\")" | |||
"Format-string for building a Clojure expression to load a file. | |||
"Planck format-string for building a Clojure expression to load a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe little typo here, shouldn't it be for Lumo? I have probably forgot to update this one myself 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inf-clojure.el
Outdated
@@ -272,7 +282,7 @@ This should usually be a combination of `inf-clojure-prompt' and | |||
:package-version '(inf-clojure . "2.0.0")) | |||
|
|||
(defvar inf-clojure-buffer nil | |||
"The current inf-clojure process buffer. | |||
"The current ‘inf-clojure’ process buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh just out of curiosity, why those forward ticks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkdoc suggested it. removed
8929305
inf-clojure.el
Outdated
@@ -649,12 +680,19 @@ If you are using REPL types, it will pickup the most approapriate | |||
:type 'string | |||
:package-version '(inf-clojure . "2.0.0")) | |||
|
|||
(defcustom inf-clojure-completion-form-planck | |||
"(doall (map str (planck.repl/get-completions \"%s\")))\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this (doall (map str ...
was necessary because lumo returns #js
. Does planck return it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -685,6 +730,20 @@ If you are using REPL types, it will pickup the most approapriate | |||
:type 'string | |||
:package-version '(inf-clojure . "2.0.0")) | |||
|
|||
(defcustom inf-clojure-set-ns-form-planck | |||
"(in-ns '%s)\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no namespace here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like in-ns
lives in top-level
cljs.user=> (doc in-ns)
-------------------------
in-ns
([name])
REPL Special Function
Sets *cljs-ns* to the namespace named by the symbol, creating it if needed.
nil
cljs.user=> (doc apropos)
-------------------------
planck.repl/apropos
([str-or-pattern])
Macro
Given a regular expression or stringable thing, return a seq of all
public definitions in all currently-loaded namespaces that match the
str-or-pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, Planck's in-ns
is a REPL special (just like in the ClojureScript REPL). It has no namespace.
Thanks for the review @arichiardi! |
👍 |
Added support for the Planck REPL
Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
M-x checkdoc
warningsThanks!