-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Expose clojurescript repl-env directly #476
Conversation
This is an alternative to, and builds heavily upon, bhauman#457 (big thanks to to @Deraen) It exposes the repl-env in the same way, and is intended for vim-fireplace. Example usage from vim-fireplace: ```vim :Piggieback (figwheel-sidecar.repl-api/repl-env) ```
@@ -83,7 +83,10 @@ | |||
(first (string/split x #"\?"))))) | |||
stack-trace)) | |||
|
|||
(defrecord FigwheelEnv [figwheel-server] | |||
(defrecord FigwheelEnv [figwheel-server repl-opts] | |||
cljs.repl/IReplEnvOptions |
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.
It's important to know what version of CLJS introduced this IReplEnvOptions. Is this going to cause legacy nightmares or has it been around long enough that this isn't a problem.
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.
First version to include this should be 0.0-2719
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.
OK this is cool then... :)
opts)] | ||
(assoc figwheel-repl-env | ||
;; these are merged to opts by cljs.repl/repl* | ||
:repl-opts repl-opts)))) |
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.
Again how many version back has this :repl-opts merging been going on.
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 was added in the same commit as the IReplEnvOptions. cljs.repl/repl*
doesn't directly use this :repl-opts
key but instead calls the -repl-options
method of the protocol and after this PR FigwheelRepl
record implements that method and uses repl-opts
property.
This is an alternative to, and builds heavily upon,
#457 (big thanks to to
@Deraen)
It exposes the repl-env in the same way, and is intended for
vim-fireplace.
Example usage from vim-fireplace:
Tested via:
in vim:
I was able to use
K
to view docs, evaluate code, and jump to source.