This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-27
Channels
- # babashka (45)
- # beginners (44)
- # calva (3)
- # cider (14)
- # clara (4)
- # clj-commons (3)
- # clj-otel (4)
- # cljsjs (1)
- # cljsrn (111)
- # clojars (5)
- # clojure (62)
- # clojure-europe (14)
- # clojure-nl (2)
- # clojure-uk (4)
- # clojurescript (31)
- # community-development (16)
- # conjure (7)
- # cursive (9)
- # data-science (1)
- # datalevin (10)
- # docker (1)
- # emacs (20)
- # fulcro (7)
- # helix (10)
- # jobs (4)
- # lsp (22)
- # malli (35)
- # meander (12)
- # music (1)
- # nbb (2)
- # off-topic (5)
- # pathom (3)
- # quil (1)
- # re-frame (12)
- # react (6)
- # reagent (18)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (4)
- # ring (1)
- # shadow-cljs (10)
- # spacemacs (9)
- # tools-build (17)
Hey. How do I prevent values from REPL appearing in my echo area (the one at the bottom)? It doesn't give me much use and it also lags the UI as I have fat structs in REPL. And then everything jumps around without much point because when I move my cursor again the echo area clears up and then reappears in one second. The only thing I want is that nothing would jump as I investigate the data structure by moving with my text cursor. Reproduction: 1. Print this into REPL:
(println (->> (range 1000)
(map (juxt identity (constantly {:key :item})))
(into {})))
2. Go to REPL buffer and move your cursor onto the map's key or on the starting/ending paren of the data structure.
3. Result in the snapshot:Consider using the Cider inspector for results of more than a few lines https://practical.li/spacemacs/evaluating-clojure/inspect.html
Wow, that's actually pretty good and I'll probably use it. But I only wanted to scroll through the lines in REPL and it was constantly jumping. It shouldn't be jumping randomly.
I don't use the REPL buffer, it's very limited. To avoid scrolling issues for large results then switch that buffer to fundamental mode (making it even more redundant) My advice is to evaluate code in source code buffers and use the inspector for larger results. keep the inspector open if you need to follow results as each expression is evaluated. Close the REPL buffer and try forget it's there..
Alright.
For me the inspector buffer doesn't have my evil-mode keybinds. Any suggestions on that? It says that the buffer is read-only but I'm not going to edit, I'm only going to move around.
Edit: I miss my 5j
and }}
to move by paragraphs and G
to go to the bottom.
Edit2: I remember when I was opening the REPL to evaluate code into it and was constantly changing its namespace into the current one. I didn't know how to evaluate code from the source buffer. Maybe this is the next step :thinking_face:
Edit3: Probably the read-only issue is with evil-mode itself
Edit4: There is a thing called evil-motion-mode
for read-only buffers. But it doesn't have <RET> and L bindings.
, e f
evaluates the current top-level form
, e e
evaluated the previous form (s-exp)
, e
is the evaluation menu and gives lots of options, more that most people need
When evaluating in a source buffer it uses the namespace of the source buffer, so you dont need to change anything, just evaluate
Evil key bindings seem to work in the inspector buffer for me, G gg, j , k, n , p, etc. I havent noticed any problems.
There arent line numbers when its a data set from the example code you provided, so 5j will not work as this is a logical representation
If you want to navigate, try evaluate to pretty print, , e p f
etc.
It doesn't matter whether there are line numbers. I made my line numbers work on my treemacs buffer and they work. So I can then add this mode into the hooks of treemacs and they'll work too.
It's an incidental problem that emacs's special-mode
prevents evil-mode motions and I can't enable evil-motion-state
on that buffer by using a hook. I can enable the evil mode manually but then it disappears when I try to navigate.
I still like cider-result better. And I can copy the result to do something with it later :thinking_face: I don't know why but cider-inspect seems to be overengineered and there is too much output. I don't care what classes there are. Maybe I'll care if I'll need to inspect a Java-based class but cider-result just works. Also evil keys don't work in cider-inspect whereas they work very well in cider-result.