Fork me on GitHub
#calva
<
2019-11-06
>
yuhan01:11:44

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 🙂

yuhan01:11:29

I tried it out briefly, argument destructuring doesn't seem to be supported

yuhan01:11:31

or gives a misleading indication

yuhan02:11:55

For reference cider-eldoc highlights the entire argument and doesn't attempt to highlight individual destsructured parts

yuhan02:11:09

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

yuhan02:11:41

Type hints / metadata / #_ ignored forms are also handled incorrectly

pez05:11:05

Thanks, @qythium . It is pretty crude still. I’ll see if I can figure out a way to avoid the miss-information....

orestis09:11:04

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?

❀ 1
pez10:11:10

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


slipset10:11:30

I haven't understood that you could make a separate pack for this.

slipset10:11:48

But that's probably what the other emacs keybinding packages are doing.

slipset10:11:56

@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.

pez10:11:33

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.

pez10:11:29

You should put the bindings in your dotfiles repo, @slipset 😃

slipset11:11:48

I was under the impression that calva stores its keybindings file under some ungodly path which is ~/Library/something/something

pez12:11:46

Maybe it does. Well, not Calva, but VS Code. That’s strange
 It has its extensions in ~/.vscode/


yuhan12:11:52

Yeah, ~/Library/Application Support/VSCodium/User/keybindings.json in my case

yuhan12:11:42

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"

pez12:11:50

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.

pez12:11:25

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

pez12:11:33

Now those ignored forms
 haha.

yuhan12:11:33

Nice! I'm not a VSCode user by the way, just know enough to try and get friends and colleagues interested in Clojure 😅

❀ 1
yuhan12:11:45

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

yuhan13:11:33

hmm.. now that I check, Cider's equivalent feature doesn't handle ignored forms either :thinking_face: Probably a simple oversight there

pez12:11:45

It is quite common in this channel with being interested in Calva on other people’s account.

pez12:11:09

The Clojure community is very special. In a good way, very special.

sheepy 1
yuhan12:11:46

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 )

pez13:11:30

Doesn’t work for you?

Tamizhvendan S13:11:31

After load the file in the REPL, the symbols list is empty

pez13:11:47

Ah, sorry, I misunderstood. No, no support for that yet.

Tamizhvendan S13:11:56

Ideally, it would list the functions right?

pez13:11:50

We should add that feature. Please file an issue if there isn’t one yet.

carmen13:11:57

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...

pez14:11:49

Very partially!

pez14:11:46

What do you get in the Jack-In terminal, Calva says, and Calva Connection Log?

pez14:11:57

Does info hovers work? Navigate to symbol? Stuff like that. What OS are you using? Version of Calva and version of VS Code?

pez14:11:37

Sorry for the quastion bomb mat, but I’ve never heard of problems like those before


carmen14:11:26

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

carmen14:11:27

^ actually I think that last message is old

carmen14:11:25

yeah connection log is just empty 🙂

pez14:11:48

Connection log is a bit of misnomer, it is about ClojureScript connection
 Which you don’t have there.

pez14:11:04

Now ignored forms shouldn’t mess up the active argument indicator.

pez14:11:46

@carmen: so basically, evrything works, but the REPL window?

pez14:11:21

Are you a new Calva user or someone who had had things working before? I seem to recognize your name and avatar


carmen14:11:47

seems so, the REPL window just stays blank

carmen14:11:07

I had Calva 1.0 working before and only just tried to switch to 2.0 🙂

pez14:11:28

But then there was no Calva window that wouldn’t work. 😃

carmen14:11:47

I don't have any sort of custom settings around the jack in

pez14:11:56

Sierra is pretty old. Maybe that is what this is about


carmen14:11:17

I've been avoiding upgrading...

pez14:11:10

Can you somehow test your project in Calva on some other machine? Colleague or whatever.

pez14:11:48

I really don’t see why Sierra should be a problem, so that is really a longshot.

pez14:11:27

Maybe you should also see if it could be the VS Code version. I have 1.39.2


pez14:11:48

(1.34 should work afaik, but we’re grasping here.)

carmen14:11:34

Ah yeah let me try updating VS Code...

pez14:11:40

Also check the console of the VS Code Developer Tools as well as the WebView Developer Tools. Maybe there are hints there


carmen14:11:30

Oh hey that did the trick!

pez14:11:43

VS Code version?

pez14:11:29

But Sierra is quite old, anyway. Haha.

carmen14:11:52

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...

carmen14:11:56

Anyway, thank you for your help!

pez14:11:22

You’re welcome. Please enjoy Calva. Unlike real world Calva it doesn’t need to be enjoyed responsibly.

😂 2
pez19:11:47

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! ❀

pez22:11:09

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.