I imagine the printing is throttled so that it doesn't interfere with the responsiveness of the rest of the app. If this were implemented with core async (it probably isn't 😆 ) simply closing the channel should cancel the rest of the queue.
This is TypeScript and promises. 😃 Would be nice to just close a channel. Maybe we can achieve that somehow…
Using 2.0.152 on Windows, seems that the decorations of the debug instrumented function is not shown anymore. The instrumentation still works as expected, just can't visually see that the function is instrumented. Is that by design?
Sounds like a bug. Please file an issue. ❤️
Done (https://github.com/BetterThanTomorrow/calva/issues/969)
I understand error "no js runtime" on browser side indicates necessity of having chrome or something open and connected
but what is equivalent of that when running node app?
solved my own problem with bad timing, you need ot actually require the exported javascript in node for it to work?
what strange magic
It’s not all voodoo. 😃 There needs to be a Clojure REPL running and it is started as part of your app/library.
Based on that error message I assume you are using #shadow-cljs?
hey, yeah or trying to
I am playing in ts but trying to understand something in internals of datascript so tried to get something connected, saw that calva uses shadow-cljs internally (I think) so tried that, but half a day later I realize that from the files in the repo, datascript is set up to use something else (?) but I'm in a REPL now so we all good
another question - is there any way to visually debug typescript/clojurescript both? like you're working on your typescript app and somehow can put a breakpoint in a clojurescript dependency
as I say it it sounds too complex for anything to work without writing it yourself
The Calva debugger only works with Clojure. But there is some trace debugger out there you can use. I have forgotten where I saw it…
Does anyone else have issues with running tests through "Run tests in current namespace"? When I redefine my tests, calva doesn't understand that they have been updated.
Tests understands the updates when I save the file manually
Thanks for the tip @eric.uitbeijerse
A save is not supposed to be necessary since the test command reloads the file, and is not necessary for me. An issue would be appreciated.
Just verified the issue also occurs on a clean project and it does. Raised issue #975 as requested.
Thanks!
Ah, I just created an issue. I will add my information to #975.
I also tried to reload the whole shebangs into the repl. If I run the tests through the repl without Calva, things works fine though 🙂
is there any way to disable linting?
Thanks! I’ll have a look when my work-for-food day is over. 😃
Thank you ❤️
Used some of my lunch for it instead, actually. 😃
can I make "Toggle Line Comment" use ;;
instead if ;
?
I've managed by changing /usr/share/code/resources/app/extensions/clojure/language-configuration.json
. not sure if there's a better way?
It saddens me deeply to see a project I respect deeply promote this incorrect commenting style
I'm on v2.0.152 & ctrl+/ comments with ;;
.
Configure clj-kondo with zero linters, I think it's the way to do it.
You are the second one this week to speak about incorrect commenting styles. We have not yet fully understood the problem though. So please explain and we will of course consider. PR welcome.
Yeah, Emacs uses ;;
for commenting just like Calva
Oh Does Calva uses only ;
?
@pez check it out: https://github.com/bbatsov/clojure-style-guide#comments
users are probably referring to comment a whole line which should use ;;
instead of ;
in age-old LISP tradition ;
is for end-of-line comments, ;;
is for commenting out whole lines/blocks, ;;;
, ;;;;
, ;;;;;
etc are for levels of headings https://stackoverflow.com/questions/6365334/lisp-commenting-convention
practically speaking the main difference it makes is that in Emacs if you (re-)indent a line starting with ;
it will align it at column 40. This is especially aggrevating if like me you use aggressive-indent-mode, since these lines will all jump 30-odd columns to the right as soon as you open a file.
that all said this is not a hill I'm willing to die on, several commonly used editors are defaulting to ;
for regular commenting, so maybe this ship has sailed and emacs clojure-mode
will end up dealing with it. But... I'm going to be sore about it just a little longer.
@zimablue There is https://github.com/clojure/tools.trace, though not sure about it working with cljs. If not, there may be other solutions out there.
Please create an issue with repro steps. I've not experienced this myself, but maybe it's a particular case, or something has broken.
Is it possible to not show "calva is activated" on startup?
I think it makes sense to me to make Calva use ;;
for line comments. I don't think there's a particular reason it uses ;
, at least that I'm aware of
Wait, Calva does use ;;
for line/block comments. When do you see it using ;
?
The "Add line comment" and "Toggle line comment" commands use ;;
, which seems in line with the Clojure style guide. Is there something I'm missing?
yeah someone else mentioned that, for me it was using ;
...
/usr/share/code/resources/app/extensions/clojure/language-configuration.json
it looks like this is actually a file that comes with VS Code itself?
I thought we had a setting to disable this, but maybe there was just talk about it. @pez?
Hmm interesting. I see this is a "built-in" extension. I wonder if in some cases/systems our language config is being overridden, and why
And you didn't install another clojure extension in the past?
@plexus Would you mind creating an issue with the details mentioned as well as your system details like vs code version and OS? That would be much appreciated so we can track this.
> And you didn't install another clojure extension in the past? I think not... I installed this some time back but am only now trying to use it in earnest for a while. I'm on Linux/ubuntu
I can make an issue
VS Code comes with a built-in Clojure extension, which, iirc, uses a toggle line comment setting that does not adhere to standard. Someone convinced me that Calva should fix this, so I did. TBH I never quite understood why this was so important. We had a discussion in this channel about it and there were people against and for changing. Anyway, we can change back too. I remember having trouble exposing it as a user setting. But that could be easier today, both because I know the APIs much better and because the APIs might have improved.
Hi! Just a bit of feedback from a new Calva user on the onboarding experience, when it comes to linting: might be worth adding something to https://calva.io/linting/ on how to make the clj-kondo config work with Calva inside VS Code (as opposed to what to write in the config, which the clj-kondo documentation is more heavy on – the Introduction part was not entirely clear to me in this use case). My specific issue was, having a repository with several projects, it didn’t apply the config.edn
held in the .clj-kondo
directory of a parent folder (not the repository root). My first fix was putting a .clj-kondo
directory in all of the separate project directories as well; this appeared to have stopped working for me today, but a new fix was just putting it in a .clj-kondo
directory in the repository root. (Would be useful to let the config be in any folder above the specific project, but maybe that’s a clj-kondo issue.)
Also, the first bulleted link “Exclude unresolved symbols from being reported” appears broken (looks like a big chunk of the documentation was deleted on December 4).
In any case, very happy with it – thanks! :)
thanks for all the effort! It is a really insignificant thing but it sticks out like a sore thumb. But seems like Calva tries to do the right thing, and that that works for other so I assume it's my setup and it's not affecting that many people. To be honest I'd be fine too with a community concencus that this tradition isn't that important and that we starndardize on single semicolon, but sadly I don't see that happening either. And IIRC Cursive has chosen to do the single semicolon so we are stuck in limbo in any case. So yeah sorry for making a fuss about this.
@marcus.josefsson There is a bug or omission(?) in calva or LSP which should be fixed now when they upgrade the clj-kondo dependency. cc @brandon.ringe @ericdallo
Thanks @marcus.josefsson for the feedback! As stated above this should be fixed soon. I'll look into that link.
You should be able to put .clj-kondo dirs anywhere in your repo and clj-kondo should pick up on this. There is no need to have only one top level .clj-kondo dir.
Link fixed. Maybe the content isn't the same, but I linked to something else useful :man-shrugging:
I think the important thing at least is that we make Calva do the same thing on all systems, so it's troubling that in some cases it does ;
and others ;;
> VS Code comes with a built-in Clojure extension, which, iirc, uses a toggle line comment setting that does not adhere to standard @pez can you point me to this?
I see /calva-fmt/clojure.tmLanguage.json
uses "(?<!\\\\);"
for begin comment, but idk if that would affect the comment commands
I see this change from a year ago
@jarvinenemil It still works fine for me, but I do have to save all the files after I update the tests (Ctrl-K S)
> @pez can you point me to this? https://github.com/microsoft/vscode/tree/ff915844119ce9485abfe8aa9076ec76b5300ddd/extensions/clojure
No worries, @plexus. I think some of this is due to that Calva is built by newcomers to Clojure. We’re still orienting ourselves and learning about the legacy. It is both a weakness and a strength, I tell myself. 😃
I find that this comment from https://github.com/avli/clojureVSCode always puts a smile on my face: > I’m trying, believe me!
Ohh I see, sorry, for some reason I was thinking you said Calva came with some other clojure extension 😅 , which is true to some extent, but not what you meant
@plexus Please comment here your system details when you get a second. We can at least gather info about this over time to try to figure out what's going on. https://github.com/BetterThanTomorrow/calva/issues/971
It shouldn't require a file save, if it does there is a bug. For me, I can run a failing test, make it pass, not save the file, "run tests in current namespace" and it passes.