-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added JS repl via skewer-mode and livid-mode to javascript layer #2979
Conversation
❤️ 👍 👍 👍 |
I love this! :) |
| ~SPC m s b~ | loads the current file in the skewer REPL | | ||
| ~SPC m s e~ | evaluates the last expression | | ||
| ~SPC m s p~ | prints the result of the last expression | | ||
| ~SPC m s d~ | evaluates the current function at point | |
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.
should be SPC m s f
see https://github.com/syl20bnr/spacemacs/blob/master/doc/CONVENTIONS.org#repls
4e76eb4
to
74f4ab0
Compare
@syl20bnr Implemented your suggestions, should be good to go now. |
@dcluna Good job! |
Nice job @dcluna ❤️ |
@dcluna ❤️ and 👍. I just started looking for how to integrate skewer in Spacemacs. |
Cool stuff! Thanks for adding this! I noticed that when skewer throws an error, focus is shifted to the repl and I have to jump back into my code manually. Would it be possible to not do that? Clojure is doing it pretty nice: |
Any updates on this? |
@dvcrn This is standard Skewer behavior, and while I agree that it would be a nice addition, I don't have the time to do it. |
@dcluna this has to be updated because the new way of declaring major modes keybindings is with |
@CestDiego Done, can you review again? |
👍 for this one! |
@dcluna great :D |
Just tested it and it seems to be working fine. |
:defer t | ||
:init | ||
(progn | ||
(defalias 'js-live-eval 'livid-mode "Minor mode for automatic evaluation of a JavaScript buffer on every change") |
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.
Why this alias ? Is it just for which-key ?
Thank you for the PR and your patience ! 👍 |
skewer-mode is a very good REPL for Javascript, and its setup is very easy (just install a Grease/TamperMonkey script) compared to other options (swank-js, jss). This PR adds it to the javascript layer, and includes livid-mode for hot reloading of a JS buffer.
This is the corrected version of #2975.