specified the maven server and then it worked.
I'm not able to navigate (go to definition of function) or list callers to a function. Does Calva not do that?
@joel380 when connected to a repl that has the appropriate definitions loaded, i was able to use f12 to go to definition
@pez i started passing some generated strings to calva's lexer today and noticed that _*
is parsed as:
[{'type': 'junk', 'offset': 0, 'raw': '_', 'state': {'inString': False}},
{'type': 'id', 'offset': 1, 'raw': '*', 'state': {'inString': False}},
{'type': 'eol', 'raw': '\n', 'offset': 2, 'state': {'inString': False}}]
is that intentional?@joel380 Calva does not list callers/references. That would be sweet. It does allow you to peek and navigate to definitions, though. You probably need to check if you have the right nrepl dependencies and that the current file is loaded.
@sogaiu, thanks for digging up those! Please file it as an issue.
ok. so if something looks odd, should i just file an issue and further discussion can take place there? i'm bound to be mistaken or uninformed on some of these things š
Well, I appreciate that you inform here if you wonder if an issue might or might not be what we need. However, with these parsing things there is a truth to be consulted, the reader. We want the Calva parser to stay as close to the reader as possible. Maybe you can rephrase that other issue you filed, about ignore markers and the absence of spaces, to read more like a collection of parsing issues you've found. At least until we pick it up and start trying to fix them.
ok, so let's see if i've got your idea correct: 1) rephrase existing issue and accumulate things there for the time being 2) if it looks like it differs from what the reader might say, add to the issue 3) if there seems to be a doubt, mention on this channel or contact you some other way to discuss and decide further action how does that seem?
If you agree, then it seems good.
Did you generate those strings using the fastcheck things in Calva's test harness, btw?
i'm fine to try the above suggested course of action. re: generating the strings -- no, i am pretty ignorant of that which you mentioned :) i am applying this: https://github.com/sogaiu/hypothesis-grammar-clojure
I see. This is the fast-check thing that I was talking about: https://github.com/BetterThanTomorrow/calva/blob/dev/src/extension-test/unit/cursor-doc/clojure-lexer-test.ts
ah cool -- thanks for the info. will take a look.
š Thanks, @stefan.van.den.oord!
My Jack-in from Calva has just stopped working. The pop up window does not appear now at all. Any suggestions on how I can debug the problem.
@humanist1965 can you try with v2.0.126? This could be an issue with the latest version, and if so we need to take immediate action.
@pez Yes v2.0.1.126 works. So it does appear to be a problem with the latest version. Iām on macOS Catalina (in case that is relevant).
Hi @pez ā same problem as @humanist1965 on Catalina, also works when I switch back to v2.0.126.
@humanist1965 @jonathan.huston what kind of projects are you jacking in to?
@pez nothing fancy, just a simple Leiningen project with five source files and a project.clj, no external dependencies. Calva starts up just fine in v.2.0.127, but when I try to jack in with the keyboard shortcut or the command palette, nothing at all happens. No problems in 126.
What can you see in the Developer Console? (Help menu)
@pez jacking in has no effect whatsoever, even in the developer console, no error or warning
Does it matter if you try jack-in from the command palette or via the keyboard shortcut?
@pez nope, no effect in either case
Does the Calva command for running all tests not work for your setup?
I'm also on Catalina, so am looking for something that can reproduce the error...
I'm on arch linux, and nothing happens at all when I run Jack-in š¬
Clojure cli project
checked on Fedora, with the same result
I probably missed that command @pez. Do you mean https://calva.io/test-runner/? I tried the ctrl+alt+c shift+t combo but maybe there's mismatch of shortcuts. I get this weird red-brown colored element in the VS Code sidebar
I think it searches file names that contain a "t" š
I see the start of the issue..
https://github.com/BetterThanTomorrow/calva/blob/b5fa6d568f8e6da9a7c47c5e4262781bb9823893/src/nrepl/jack-in.ts#L145 liveShareSuppoer.setupLiveShareListener()
is throwing an exception, and the catch block just returns and short-circuits jack-in
Great. If you have some time to try to ship a fix, that would be great. Otherwise I'll give it a go tomorrow morning. It is getting too late here and my brain is not really up to it. š
I may be able to ship something today, but should we roll back for now? I don't know the rollback process
@pez. Also found that this call returns null if the live share extension is not installed https://github.com/BetterThanTomorrow/calva/blob/b5fa6d568f8e6da9a7c47c5e4262781bb9823893/src/liveShareSupport.ts#L17
Which results in the next line throwing an error for calling a function on null
So, a check there should fix. I'm on it now
Awesome. Will you be able to test a VSIX quickly, if @brandon.ringe posts it here, @jonathan.huston, @humanist1965?
Haha, weird. But try from the command palette?
Anyway, I'm sorry to abandon you, but I am pretty useless right now. š¤
No problem! Sleep is important. Rest up
The benefit of us having such different time zones š
I refreshed my workspace and looked in the key bindings (I wasn't successful there though). I don't know what I did exactly now, but the test runner works now as expected š
Is there a way to auto-format clojure maps such that values are vertically aligned, similarly to how Intellij/Cursive can do it?
There is a formatter config for this. See https://calva.io/formatting/
Beware that it behaves a bit crazy at times. I stick to manually aligning using he command.
(`:align-associative?` is the config param. I forgot to mention that.)
Try the (experimental) command "Format and align current form" - default key kinding is ctrl+alt+L
It's experimental, but seems to work for me
thanks @brandon.ringe :star-struck:
@jonathan.huston @humanist1965 and or anyone else for whom jack-in was broken, please test this vsix to make sure it works now: https://8346-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.128-fix-broken-jack-in-dd74c009.vsix
Could I rebind it to be executed on save?
Hmm... not that I'm aware of. @pez, is this possible? And if not, is this something that would be a good idea / possible to add to Format As You Type, or whatever the default formatting is that happens when you press tab?
This is working for me, if I can get a confirmation from someone soon that would be awesome. Otherwise I may just push the new version since this is a time-sensitive thing imo.
Have some other things to do today, so releasing now š
Version 2.0.128 is out, and jack-in should be working for all! Please report any issues.
seems to be working fine here š (sorry it's not an issue)