goodmorning jack-in-clj&cljs with shadow-cljs seems to start two clojurescript repls for me does anyone has the same issue? is it spacemacs or cider? thanks
@jr0cket @spfeiffer @aisamu thanks for the help. Including the correct globbing patterns in the .gitignore file did the trick.
Usually when I want to evaluate a form SPC m e f
does the trick. This is very handy because I can eval the form when my cursor is at any point of the form.
However while development I also have a lot of forms in the comment block, and these cant be evaled using the above. To eval these forms I need to navigate to the start of the form and then eval them using SPC m e v
This works but is tedious, because I always need to navigate to the start of the form first.
Any tips on how I can reduce the pain ?
(setq clojure-toplevel-inside-comment-form 't)
this will make ,ef
work as โexpectedโ in comment forms
To evaluate forms in a (comment ,,, )
block using , e f
I add the layer variable clojure-toplevel-inside-comment-form t
to the clojure layer definition in .spacemacs. For example, my clojure layer config is as follows
(clojure :variables
clojure-toplevel-inside-comment-form t
cider-overlays-use-font-lock t
clojure-enable-linters 'clj-kondo)
If you are going to use setq instead, then it should really be wrapped in an add-hook
form.For individual forms I simply use the #_
reader macro to comment that form. If this is placed on the line before, then , e f
will evaluate even though the form is commented. For example:
#_
(str "I wont evaluate when you eval the buffer, but will evaluate when using , e f")
You can also create a design_journal.clj
namespace and add your forms to that, then you do not need to comment them out at all
@thenonameguy @jr0cket thanks for the tips
I feel lately that my spacemacs is not snappy, it takes time to respond to commands, is there anything I can do to make it more responsive ?
@murtaza52 The only time I had Spacemacs become slow to respond was when my Operating System updated the desktop compositor (compton) it used and there was a lag redrawing the cursor, very annoying. Otherwise I have always had Spacemacs be very responsive across multiple laptops.
Is it still slow if you switch the current fundamental mode? Sometimes excessive font locking can slow things down, so fundamental mode will switch that off. Have you checked Emacs its running any processes, SPC a p
?
There are some other troubleshooting ideas here, probably the ones toward the bottom are more relevant https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html
I get the following warning when I connect to an external shadow-cljs
repl -
WARNING: CIDER requires cider-nrepl to be fully functional. Some features will not be available without it!
However if I start the shadow-cljs using cider-jack-in I dont get the warning. What could be wrong ?@murtaza52 cider-nrepl library is injected into the command line when using cider-jack-in-
commands. You need to add cider-nrepl to your startup or project when using cider-connect
and using a version that works with the version of CIDER you are running (one reason I try avoid using cider-connect
) . I am sure there are some docs that describe how to do this on the internet, but I have forgotten how to do this now, sorry.
There is some info in the shadow-cljs docs https://shadow-cljs.github.io/docs/UsersGuide.html#_preparing_the_app
although using jack-in approach is going to be less fiddly https://shadow-cljs.github.io/docs/UsersGuide.html#cider
thanks created a new alias in the deps.edn and added the cider-nrepl dep there. Then referred that alias in the shadow-cljs.edn file.
Has anyone had luck with the kuberenetes layer? It just crashed my computer ๐
@drewverlee not tried kubes layer in Spacemacs yet. You could always ask on the Spacemacs Gitter chat https://gitter.im/syl20bnr/spacemacs
Or raise an issue, SPC h I