This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-17
Channels
- # announcements (1)
- # asami (3)
- # babashka (10)
- # beginners (61)
- # calva (60)
- # clojure (47)
- # clojure-nl (3)
- # clojure-uk (10)
- # clojurescript (36)
- # conjure (18)
- # cursive (4)
- # datomic (25)
- # fulcro (21)
- # luminus (1)
- # malli (25)
- # off-topic (26)
- # pathom (2)
- # portal (55)
- # re-frame (1)
- # reagent (7)
- # sci (1)
- # shadow-cljs (25)
- # sim-testing (2)
- # sql (14)
- # vim (6)
- # xtdb (10)
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.
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?
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
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).
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 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 😉
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.
@pez jacking in has no effect whatsoever, even in the developer console, no error or warning
@pez nope, no effect in either case
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
Awesome. Will you be able to test a VSIX quickly, if @brandon.ringe posts it here, @jonathan.huston, @humanist1965?
Is there a way to auto-format clojure maps such that values are vertically aligned, similarly to how Intellij/Cursive can do it?
Try the (experimental) command "Format and align current form" - default key kinding is ctrl+alt+L
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?
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.
@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
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.