This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-24
Channels
- # 100-days-of-code (7)
- # announcements (1)
- # bangalore-clj (1)
- # beginners (87)
- # boot (6)
- # cljdoc (16)
- # cljsrn (13)
- # clojure (32)
- # clojure-dev (30)
- # clojure-italy (18)
- # clojure-nl (4)
- # clojure-serbia (1)
- # clojure-uk (48)
- # clojurescript (18)
- # cursive (18)
- # datascript (1)
- # datomic (7)
- # events (9)
- # figwheel-main (28)
- # fulcro (2)
- # hyperfiddle (2)
- # immutant (8)
- # jobs (16)
- # liberator (4)
- # nyc (2)
- # pedestal (15)
- # re-frame (8)
- # reagent (12)
- # reitit (8)
- # remote-jobs (1)
- # ring-swagger (2)
- # robots (1)
- # rum (1)
- # schema (1)
- # shadow-cljs (45)
- # spacemacs (49)
- # sql (13)
- # tools-deps (59)
- # uncomplicate (1)
- # vim (10)
Hi, I am trying to set (setq cider-eval-toplevel-inside-comment-form t)
inside user/config
to evaluate inside comments
expr, but it seems not working
anyone has the same issues?
(https://clojureverse.org/t/anyone-else-gets-annoyed-with-cider/2399/5)
@kirill.salykin I dont have the same problem, but that is because I use the reader macro #_
rather than (comment )
. For example, #_(+ 1 2 3)
instead of (comment (+ 1 2 3))
thanks
however, if you want to still use comment, I'll take a look.
it would be nice…
did you try the other two setq functions and did they work?
actually I didn’t
maybe it is not right place to change cider..
It may be something simple like you have an older version of cider. For spacemacs, do you use the master
branch or did you switch to the develop
branch before first installing spacemacs
if you are not sure, you could also try calling the function cider-version, eg. SPC SPC cider-version
I am on develop branc
0.18.1 snapshot
oh, you are ahead of me for Cider, I'll have a look at updating my version today
thanks
Okay, so it seems you should have the version that has those pull request in. so maybe it is the way you are adding the setq code to dotspacemacs/user-config
. did you just copy the line as is into this section?
Also I put it i user-config
Did you evaluate the (setq cider-eval-toplevel-inside-comment-form t)
expression, eg. with , e e
or C-x C-e
or reloading the .spacemacs
config with SPC f e R
or simply restarting Spacemacs?
I restart spacemacs
but didnt evaluate
I’ll play with it in the evening
with evaluation it will be way faster
thanks!
Someone might think I was writing a book on Spacemacs 😉 https://practicalli.github.io/spacemacs/
indeed!
thanks a lot
The (setq cider-eval-toplevel-inside-comment-form t)
didnt work for me, when testing on something simple like (comment (str "i am not a comment"))
. I am on version 0.18.0
but that should still have the June pull requests. I'll upgrade packages and see if that helps. If its not the version, then maybe it needs to be inside an add-hook
function to avoid being overwritten when the Clojure layer lazily loads.
possibly, i’ve been thinking about addhook as well
I'll try this add-hook config when i have updated the packages in spacemacs (as its still not working) https://gist.github.com/jr0cket/eeadeed6482149e23928d3354fc83e6c#file-spacemacs-el-L747-L749
didn’t work for me as well
Nope, didnt work. Not sure why this is actually needed. If you put your cursor at the end of the line in Vim normal mode and evaluate with , e e
then it will return the value of the expression inside the comment expression already
I now eval region
seems a bit faster to eval at defun
Ah yes, you can select an expression inside the comment
function with SPC v
and then evaluate the region with , e r
, thats nice
Someone might think I was writing a book on Spacemacs 😉 https://practicalli.github.io/spacemacs/
@kirill.salykin If you are interested in using the #_
alternative to comment, I have a little function that toggles those characters and a keybinding to call it https://gist.github.com/90c415dbc268be32b3ffe16bf40012fc
is anybody having issues when printing large strings on the repl?
emacs gets very laggy when I do so 😕
I've been told it could be font-lock-mode
Thanks for tip @jr0cket and thanks for the book, I think I read couple chapters
There is still a lot to add to the book and ideas are most welcome
@andrea.imparato if the repl if formatting that string then it could be font-lock. The repl should truncate results, so you must have some really big strings, so do you have any examples? I can parse a whole book and print it out in the repl without any real lag: https://github.com/practicalli/clojure-through-code/blob/master/src/clojure_through_code/xx-hhgttg-book.clj
If you are generating strings with code and want to see the results, you can also try , e P
to print into a separate buffer. I am unsure if this will help with your lag though.
yep the repl is formatting the string because it's not a string, it's a huge map generated from a xml file
You can always toggle font-lock mode for a buffer via SPC SPC font-lock-mode
Ah, XML, that sounds like a challenge, especially if it is deeply nested
could you use https://clojuredocs.org/clojure.core/spit to push it to an external file and then look at it. Or just use the keys in the clojure map to check the parts you are interested in at any particular time.
using get-in really-big-map [:keys :to :interesting :part]