This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-04-02
Channels
- # announcements (5)
- # beginners (36)
- # biff (2)
- # calva (51)
- # clojure (12)
- # clojure-austin (7)
- # clojure-europe (11)
- # clojure-nl (1)
- # clojure-norway (63)
- # clojure-uk (2)
- # community-development (5)
- # core-typed (10)
- # datomic (9)
- # graalvm (6)
- # honeysql (1)
- # jobs (4)
- # leiningen (14)
- # london-clojurians (1)
- # lsp (23)
- # malli (88)
- # missionary (10)
- # off-topic (41)
- # practicalli (7)
- # re-frame (1)
- # reitit (5)
- # releases (2)
- # remote-jobs (1)
- # ring (11)
- # squint (2)
- # xtdb (5)
Anyone else notice folding stops working in VSCode after Calva / Clojure-lsp start-up? Am trying to pin down what's the cause here.
Calva version used: v2.0.433
clojure-lsp version used: 2024.03.31-19.10.13
clj-kondo version used: 2024.03.13
Okay, it seems to be clojure-lsp. When I stop the clojure-lsp server via the bottom toolbar folding works again, when I start it, it stops working. Will post this in #CPABC1H61
This is fixed in the nightly
build of clojure-lsp. And will be fixed in latest
next time they cut a clojure-lsp release. See my comment on the issue linked in this thread for how to switch over to nightly
.
as I missed that indentation is what I'm used to I think, it's indistinguishable from semantic once you've autoformatted I guess, thanks
So what do we need to use the non-“boring” one? I switched to lsp nightly. Set mode to “auto” or “indentation”?
Seems like “indentation” allows folding nested forms, where “auto” does not.
@U09D96P9B yes. Seems that clojure-lsp only uses top level forms. And not RCFs.
Did something change in the Calva REPL to where on errors my entire REPL turns into a big comment?
The text turns green and the REPL becomes unusable until I close the connection, delete the REPL output.calva-repl
file, and reconnect
I have not changed any settings, it was only after I updated
This has come up several times recently.
Calva changed output to comments so that your REPL window doesn't break syntax related stuff.
There's a setting to get the legacy behavior back, but the output window is going away and will switch to a new output terminal that has different behavior for highlighting.
(I'm in a meeting otherwise I'd link you to the threads that talk about -- search for legacy
in this channel and you should find the threads about the settings)
Thanks!
I think if you search for legacy
in settings in VS Code, it will find the two(?) legacy setting flags.
I've already switched to the new terminal output window (but I've always had Calva's REPL output hidden nearly all the time anyway).
My meeting is over now, so if you need more help, LMK...
Actually I am a little confused reading this document https://calva.io/output/#about-stdout-in-the-repl-window
So now the output is in a comment form but it seems like you are talking about a seperate output window from the input window entirely...
I do alot of things like adding prints
while I playing in the REPL and having another window to see those as well as things as exceptions would be ideal!
What setting do I have to enable to move all my output to a separate window?
The changes shouldn’t affect what happens in errors, and unusable wasn’t what we aimed for either. Sounds like something is going very wrong.
Starting the repl looks fine
; Connecting ...
; Reading port file: file:///REDACTED_BY_ME ...
; No nrepl port file found.
; Hooking up nREPL sessions ...
; Connected session: clj
; Evaluating code from settings: 'calva.autoEvaluateCode.onConnect.clj'
(when-let [requires (resolve 'clojure.main/repl-requires)] (clojure.core/apply clojure.core/require @requires))
nil
clj꞉user꞉>
Printing is fine
clj꞉user꞉>
(println "HELLO")
; HELLO
nil
This is fine
clj꞉user꞉>
(defn test "" [data] (clojure.pprint/pprint data))
#'user/test
clj꞉user꞉>
(test {"key" #{"VALUE1" "VALUE2"}})
; {"key" #{"VALUE1" "VALUE2"}}
This breaks it (half of it is commented out and green and the repl no longer accepts input)
(Perhaps this is user error but I replicated it)
(test (zipmap (map str (range 1 2000)) (map str (range 1 2000))))
So it seems to only be with very large outputs but 2000 lines is not that bad....
How do I do that? Do I open up an issue on the repository?
👍 Sorry yea very new to this kind of stuff still
Worth checking whether it works in the new terminal output too -- if it does, maybe you should just switch to that?
How do I switch to that?
Turn OFF the legacy REPL output setting.
👍 Roger
So it switches to the new REPL window.
Using the terminal as output the stuff I ran above is fine, using the REPL input and output in the same window without legacy behavior this seems like an issue, I have not tried with legacy behavior
I will just switch to the new terminal, I like this alot better but another question while I have you.... If I start a REPL manually and connect to it using Calva how does the output work then with the output still set to terminal (since Calva did not start the REPL I am a little confused)?
Dunno. Try it and see...
Yea I just tested it thanks! Did you still want me to open up that issue for the non legacy output in the same window issue?
Yes, even though we are eventually retiring using the REPL Window for output, it is still good to have a record of what issues it has. And also if this is a regression, I need to at least investigate what happened, because the changes really shouldn’t have that effect.
I could repro once. But not any longer. Very strange issue, but also we do know that the repl window has issues with processing a lot of output messages in quick succession, so this may be triggering that.
The strange part to me here is that it would matter if we prepend the output lines with a semicolon or not.
👍 Thanks for the help!
Yea its only with the non legacy behavior with the old window, the legacy behavior seems to work fine. And so does the new terminal window