This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-17
Channels
- # announcements (12)
- # babashka (27)
- # beginners (65)
- # biff (8)
- # calva (22)
- # clj-kondo (1)
- # clj-otel (5)
- # clojure (65)
- # clojure-europe (127)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-portugal (2)
- # clojure-uk (2)
- # clojurescript (18)
- # cursive (5)
- # data-science (3)
- # datahike (14)
- # datascript (3)
- # datomic (7)
- # deps-new (11)
- # emacs (31)
- # exercism (1)
- # fulcro (1)
- # honeysql (3)
- # hyperfiddle (38)
- # introduce-yourself (4)
- # leiningen (2)
- # malli (20)
- # meander (2)
- # missionary (3)
- # off-topic (4)
- # pathom (3)
- # practicalli (2)
- # reagent (5)
- # releases (1)
- # sci (1)
- # shadow-cljs (9)
- # xtdb (8)
I am using VS Code + Calva on OSX. With version 2.0.331, everything works fine. With today's version 2.0.332, everything is broken. VS Code detects the file is clojure. However all Calva functionality is broken. Eg, the formatter says that calva is configured as the formatter, but is unavailable. The Calva items in the bottm status bar don't appear, ie the REPL button, the clojure-lsp button etc are not present. I am not sure where should I check for log messages to share here.
I am in the middle of my work day, so I will update to the "broken" version at the end of the day, and share any log messages, debugging info then.
Yes. I am continuing my work with 331.
> I am not sure where should I check for log messages to share here. Sounds like the Calva Extension fails to activate. But then you should get an error message popping up... Check the development console for error messages (you can open it from the Help menu).
Without interrupting your work all that much you can install VS Code Insiders https://code.visualstudio.com/insiders/ and check the logs there. It'll run as a separate VS Code instance.
Anyone here subscribed to Github Copilot? I’m currently in the 60 days trial and the results are underwhelming. Suggestions are rare, and if they show up, they are mostly incorrect. On the other hand, a friend of mine, who is coding in PHP and TypeScript loves Copilot - I guess it depends on the language and number of projects on Github. Anyway, it seems that the issue https://github.com/BetterThanTomorrow/calva/issues/1781 does still exist, e.g. when Calva proposes a Keyword expansion and Copilot makes a suggestion at the same time, the Copilot suggestion will appear only shortly and then disappear when Calva’s box is displayed.
I'm using it. As an open source contributor I get to use it without paying money. Not sure I would pay for it (but maybe). That said, I don't have it enabled for Clojure files. I use it on demand there instead, for doc strings and such. When I need some starting code for something I either don't know how to do, or can't bother whipping up, I ask ChatGPT for that. But for TypeScript, CoPilot works great! I had forgotten about that issue. Thanks for heads-up! Please feel invited to have a take on it.
Thanks Peter! Not sure if I can tackle that, but perhaps I should let Copilot loose on it… 😉
@U02G3DBJ2SY I've found Copilot can be halfway decent at generating test code but pretty bad at generating source code -- and it doesn't understand parens properly so it often inserts too many closing )
. Like @U0ETXRFEW I only use it at all because they offered it to me free as an OSS maintainer -- I wouldn't pay for it (and I only have it installed on my personal laptop, not on my work desktop).
GPT is more useful. Calva lacks a html->hiccup converter. ”GPT, please make this a html into a hiccup.” ”GPT, please turn this markdown bulleted list into a table” ”GTP, this CSS... Please make it so I can use it with Garden.” 😃
And also when I am unfamiliar with some API. ”GPT, can you write an example of using the MediaDevices API to record video in the browser?”
Very cool examples 🙂 You inspired me to try GPT today as well, writing a “deep-merge-with” function. It did almost work, but had a bug… well, can’t have it all I guess, but still cool.
I’ve been using it for a while and as Sean pointed out, it can be annoying with the way it adds extra closing parens. I have had it suggest good Clojure code though. One place I’ve had it help out with a lot is inline defs, which I use fairly often when debugging. It’s good at detecting what you’re trying to inline def (function args, let bindings, etc.), so, mostly, you can just type (def
, accept suggestion, repeat, until all bindings you want to def are def’d.
I should try scope-capture or snitch though as they both offer inline def’ing so you don’t have to do it manually.
On another note, it can be good for documentation too.
Is there a way to disable calva’s auto-formatting-on-type? I’ve noticed that when my machine gets overloaded, I stop being able to type into any of my clojure windows, because (I think) Calva is intercepting the typing (specifically, deletion) to try and do something smart with it
That doesn't sound good at all. Is it Calva that overloads your machine or is it that when it is overloaded Calva starts getting unresponsive? To run without auto-formatting, use VS Code settings, I think it is Editor Format on Type, or something. Though Calva does not do much auto-formatting on type at all, so I wonder how much that could be involved (it only happens when you press return, I think). As for backspace, that does make Calva try to be a bit smart, to not delete balanced brackets. You can toggle that off with the Paredit mode button in the toolbar to the right. If it shows hard brackets around a lambda, then it is in strict mode, click it to toggle it, it should show soft brackets (parens). Then it is regular VS Code deletion going on.
ok, I’ll switch the paredit mode. It’s definitely just vscode getting overloaded
See if the development console shows anything interesting when it happens. (Help menu). Is it happening in any file or can you see that it is some particular files where it happens?
What is the proper way to clear the REPL window? I deleted everything and saved it, but that is messing with the syntax highlighting.