This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-06
Channels
- # announcements (12)
- # babashka (34)
- # beginners (85)
- # calva (76)
- # cider (14)
- # clj-kondo (49)
- # cljs-dev (32)
- # clojure (418)
- # clojure-europe (3)
- # clojure-france (4)
- # clojure-italy (17)
- # clojure-losangeles (8)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-spec (2)
- # clojure-uk (88)
- # clojuredesign-podcast (4)
- # clojurescript (49)
- # clojurex (75)
- # clr (2)
- # core-async (13)
- # cursive (6)
- # datomic (57)
- # duct (31)
- # emacs (6)
- # fulcro (25)
- # graalvm (67)
- # graphql (13)
- # hoplon (1)
- # java (6)
- # juxt (11)
- # kaocha (5)
- # keechma (2)
- # leiningen (16)
- # mount (1)
- # off-topic (19)
- # pathom (2)
- # pedestal (1)
- # re-frame (11)
- # reagent (21)
- # reitit (22)
- # rewrite-clj (1)
- # shadow-cljs (98)
- # spacemacs (5)
- # sql (16)
- # tools-deps (8)
- # vim (28)
- # xtdb (4)
That looks pretty awesome! Last time I looked at Calva a few months ago it didn't even display fn signatures, now I'd definitely feel comfortable recommending it to others đ
For reference cider-eldoc highlights the entire argument and doesn't attempt to highlight individual destsructured parts
Also I wonder if defn
/ defmacro
forms could be special-cased somehow, it might be misleading for beginners to see doc-string?
or attr-map?
highlighted when they're in the arg vector
Thanks, @qythium . It is pretty crude still. Iâll see if I can figure out a way to avoid the miss-information....
Hey! I'm trying Calva again and it's GREAT! Props to the team đ Is there a way for me to change the keybindings to CIDER's flavor? Like a "keymap" pack that I could download?
Such a pack would be awesome. Here is a start: https://calva.readthedocs.io/en/latest/emacs-keybindings.html Not sure what the state of it is, I think @slipset might have experimented a bit with thisâŠ
@orestis the page that @pez linked to is my setup. I'd love if that became a package of some sort, because, it's too tedious to remember to apply these acrosss my machines.
I have no clue if it can be made a pack. Maybe it can⊠Please file as a feature request on the Calva repo. Even if this gets a repo of its own somewhere, it is a start for the discussion.
I was under the impression that calva stores its keybindings file under some ungodly path which is ~/Library/something/something
Maybe it does. Well, not Calva, but VS Code. Thatâs strange⊠It has its extensions in ~/.vscode/
âŠ
I have a Makefile in my dotfiles dir that places symlinks there to make setup and syncing across machines easier:
target:
-ln -sf $(CURDIR)/vscode-settings.jsonc "$(HOME)/Library/Application Support/VSCodium/User/settings.json"
-ln -sf $(CURDIR)/vscode-keybindings.jsonc "$(HOME)/Library/Application Support/VSCodium/User/keybindings.json"
Cool! Can you add that somewhere in the Calva docs, please? I know it is more general vscode stuff, but hey, it is good info for Calva users.
I think it fits on this page somewhere: https://calva.readthedocs.io/en/latest/customizing.html
btw, @qythium, (and anyone else interested), I pushed some new commits to that signature help PR. Now should handle destructuring and will not even try to guess the active argument for forms with those optional-arg?
things. I choose to just skip when I see a ?
in the arglist anywhere. Seems better than blacklisting forms, which will break on custom macros and such. Hereâs the VSIX: https://1999-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.58-wip-sinature-handler-use-paredit-85cca6f3.vsix
Nice! I'm not a VSCode user by the way, just know enough to try and get friends and colleagues interested in Clojure đ
You could probably look at CIDER's forward-logical-sexp function for that? It automatically skips all type hints, metadata and anything starting with #
- not sure how applicable it would be to the LispTokenCursor I see there
hmm.. now that I check, Cider's equivalent feature doesn't handle ignored forms either :thinking_face: Probably a simple oversight there
It is quite common in this channel with being interested in Calva on other peopleâs account.
Feel free to take and adapt that snippet I posted above! I'm using the VSCodium fork, the path would be different for regular VSCode users ( replace VSCodium
-> Code
)
@pez Do we have Go to Symbol support in Calva https://code.visualstudio.com/docs/editor/editingevolved#_go-to-symbol
After load the file in the REPL, the symbols list is empty
Ideally, it would list the functions right?
There is an old PR: https://github.com/BetterThanTomorrow/calva/pull/164
Sure..
The RPEL window that pops open after connecting is just blank for me đ Doesn't matter if I connect to a running REPL or start it from VS code. If I try to load the current NS into the REPL then it just spawns more empty REPL windows. However, I'm able to evaluate inline code so things are partially working...
Does info hovers work? Navigate to symbol? Stuff like that. What OS are you using? Version of Calva and version of VS Code?
System: macOS Sierra VS Codium 1.34.0 Calva 2.0.57 Hovers work, navigate to symbol works. Jack in terminal:
> Executing task: lein update-in :dependencies conj '[nrepl"0.6.0"]' -- update-in :plugins conj '[cider/cider-nrepl"0.22.4"]' -- update-in '[:repl-options :nrepl-middleware]' conj '["cider.nrepl/cider-middleware"]' -- with-profile +profiles/dev,+project/dev,+dev repl :headless <
2019-11-06 09:10:22,362 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
nREPL server started on port 53598 on host 127.0.0.1 -
Calva says:
Jacking in...
Hooking up nREPL sessions...
Connected session: clj
cljc files will use the clj REPL.
Jack-in done.
Calva Connection Log
Socket closed
Connection log is a bit of misnomer, it is about ClojureScript connection⊠Which you donât have there.
New dignature help++ VSIX to test, @qythium and others: https://2003-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.58-wip-sinature-handler-use-paredit-3dff5f2d.vsix
Are you a new Calva user or someone who had had things working before? I seem to recognize your name and avatarâŠ
Also check the console of the VS Code Developer Tools as well as the WebView Developer Tools. Maybe there are hints thereâŠ
It is, but I just haven't seen a reason to update it over the years. They're not adding anything new that I need...
Youâre welcome. Please enjoy Calva. Unlike real world Calva it doesnât need to be enjoyed responsibly.
Dear Calva-friends. In case youâve missed the memo: You can now sponsor my Calva development via GitHub sponsors: https://github.com/sponsors/PEZ The first year of my membership GitHub will match your sponsorings, so your dollars will work twice as much. Thanks in advance! â€ïž
Now we really need help testing this VSIX: https://2019-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.58-wip-sinature-handler-use-paredit-d1194df1.vsix
It turned out that the signature help improvements got really weird on Windows with its CRLF
line endings, so we needed to change things in how Calvaâs Clojure parsing and walking works. There is a risk something else breaks now, so please give that VSIX a spin, friends. Test not just the signature help, but also that the REPL window output and input hasnât broken in new ways.