This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-02
Channels
- # announcements (1)
- # aws (5)
- # babashka (13)
- # beginners (202)
- # bristol-clojurians (3)
- # cider (16)
- # clojure (283)
- # clojure-dev (8)
- # clojure-finland (30)
- # clojure-italy (4)
- # clojure-nl (6)
- # clojure-spec (17)
- # clojure-survey (161)
- # clojure-sweden (7)
- # clojure-uk (62)
- # clojurescript (4)
- # core-async (31)
- # cursive (3)
- # datomic (7)
- # defnpodcast (1)
- # fulcro (8)
- # jobs (2)
- # lumo (2)
- # malli (2)
- # off-topic (24)
- # other-languages (1)
- # overtone (1)
- # re-frame (6)
- # remote-jobs (3)
- # shadow-cljs (6)
- # spacemacs (17)
- # tools-deps (20)
Very short question: eval top level sexp and pretty-print to comment
: I would like to bind this to , e ;
(such how it is written in the docs), but don’t know how (being a Spacemacs newbie)
@mmeix maybe this should work by placing this in your .spacemacs file in the dotspacemacs/user-config
section
(spacemacs/set-leader-keys-for-major-mode
'clojure-mode "e;" 'cider-pprint-eval-last-sexp-to-comment)
Thanks, that worked! So all those personal settings should go into dotspacemacs/user-config
- noted!
yep, thats executed at the end when spacemacs loads and can override existing settings too.
@mmeix I am assuming you are using the master
branch of Spacemacs, as the develop
branch has that keybinding in already, along with about 2 years worth of improvements for the Clojure layer and Spacemacs itself (there will be a master release some day, but for now develop
is quite stable) . You might also want to look at my online guide for Clojure development with Spacemacs https://practicalli.github.io/spacemacs/
Feel free to ask any questions you have here, its a friendly channel and welcome to Spacemacs...
I just clone
git clone ~/.emacs.d
and then git checkout develop
in the .emacs.d
directory it createsWell, @mmeix, your command does exactly the same, but in one command instead of two. So it may be more "proper" 😉
Any tools to convert javascript to cljs? I’m currently reading a book, and copy pasting javascript snippets, so I can rewrite them more easily. But having to rewrite them is a bit tedious and it would be nice if there was some sort of refactor function to (for example) convert:
foo.bar.baz("abc", 123);
into
(.. foo -bar (baz "abc" 123))
I would imagine that given the broad syntax of JavaScript, you would only get a very narrow translation if there were such a tool.
I would also be weary about direct translations. I appreciate you need to start somewhere, but the programming model between JavaScript and ClojureScript is not that close.
You can always put js/
in front of many javascript function names until you discover more about ClojureScript. Sorry, I can be of more help.