This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-03
Channels
- # announcements (3)
- # babashka (29)
- # beginners (95)
- # calva (109)
- # cider (16)
- # clj-kondo (6)
- # clj-together (1)
- # cljdoc (2)
- # cljsrn (2)
- # clojure (85)
- # clojure-europe (26)
- # clojure-india (1)
- # clojure-seattle (1)
- # clojure-uk (6)
- # clojurescript (14)
- # conjure (4)
- # cursive (8)
- # datomic (6)
- # emacs (21)
- # events (1)
- # figwheel-main (5)
- # fulcro (11)
- # graalvm (32)
- # graphql (1)
- # holy-lambda (7)
- # humbleui (7)
- # jobs (3)
- # membrane (8)
- # nextjournal (31)
- # off-topic (29)
- # pathom (14)
- # polylith (9)
- # portal (16)
- # practicalli (4)
- # reitit (17)
- # releases (1)
- # remote-jobs (2)
- # ring (4)
- # sci (20)
- # shadow-cljs (24)
- # sql (1)
- # vim (12)
- # xtdb (3)
Hello. I'm trying to test Calva in VSCode, but McAfee antivirus detects clojure-lsp.exe as a virus:
Never saw that, not sure there is anything calva or clojure-lsp can do to avoid that
Maybe some virus has been made with GraalVM and the fingerprinting gets close enough? Thanks for letting us know, @U0363NW6C2C. We can't do much about this, but good to know about it happening out there.
It should be configured like so, btw.
"cSpell.languageSettings": [
{
"languageId": [
"clojure",
"plaintext",
"typescript"
],
"allowCompoundWords": false
}
]Has this happened to anyone else?
Typo in https://calva.io/get-started-with-clojure/ I didn't find any email contact to inform you about the typo
Looks like there are a number of similar typos in the docs https://github.com/BetterThanTomorrow/calva/search?q=clojurescipt @U0ETXRFEW @U0363NW6C2C You can file issues on the docs in the main Calva repo I think? https://github.com/BetterThanTomorrow/calva/issues (it took me a while to figure out that the docs are in the main repo -- and I'm not certain about it)
Thanks for letting us know @U0363NW6C2C! As @U04V70XH6 said, you can file issues on the Calva GitHub repo. Yes, the docs are in the main Calva repo at docs/site
.
The docs location as well as information on how to edit the documentation can be found in the wiki, if you’d like to submit a PR for docs changes: https://github.com/BetterThanTomorrow/calva/wiki/How-to-Hack-on-Calva#editing-documentation
How funny that we have three of those. Sort of adds to my suspicion that I am a tiny bit dyslexic. Thanks for reporting @U0363NW6C2C ! And thanks for making that search, @U04V70XH6. How did you figure out that it might be more of those there?
@U0ETXRFEW Whenever I see a weird typo somewhere in a repo, I search for it on GitHub because it's common that if an author's misspells a word once, they will likely do so repeatedly.
(I had a Grammar School education -- and have a "stupid human trick" that I can spot typos in a page of writing without even reading it all)
My school was like Hogwarts -- hundreds of years old, four houses, sorted by academic and sporting ability, very strict, everyone used surnames only 🙂
Yesterday I found out that my spell checker has a weird default setting, showing some “obvious” misspellings through. https://github.com/streetsidesoftware/vscode-spell-checker/issues/345
Thanks, @U04V70XH6. I've filed and issue https://github.com/BetterThanTomorrow/calva/issues/1570
> common that if an author's misspells a word once, they will likely do so repeatedly. Indeed. Someone mispelt a column name in a db we use here, now it's mispelt all over the bloody place, I think I tracked down the culprit.
I do quite a lot of proof reading and author coaching in another part of my life. (I must rely a bit on spell checkers because I have a bit hard to see some obvious spelling errors.) Anyway, despite having done this for decades, I wasn't aware of this that people tend to repeat particular misspellings. Would never have thought of doing a search for that error!
@U0ETXRFEW Peter, did you realize you misspell "Spelling" (as Speling) in the fixes you made in the repo? 🙂 And there is a missing fix, as you can see in https://github.com/BetterThanTomorrow/calva/search?q=clojurescipt
And I should fix the README's and such as well. I mostly focused on http://calva.io stuff.
hello, one question, I'm trying to change the coloring of keywords, I followed the docs but for some reason the color isn't applying, I'm using the Darcula Theme, is there a troubleshoot way to figure what still the issue?
this is what my settings looks like
{
"telemetry.enableTelemetry": false,
"git.autofetch": true,
"sync.autoUpload": true,
"sync.gist": "895b58b684cbf99ae05554782cdd2405",
"sync.autoDownload": true,
"editor.fontFamily": "JetBrains Mono,Menlo, Monaco, 'Courier New', monospace",
"editor.tabSize": 2,
"editor.fontLigatures": true,
"editor.minimap.enabled": false,
"calva.highlight.bracketColors": ["#aaa", "#f00", "#ffa500", "#ee0", "#0d0", "#0ff", "#f5f5ff", "#ab02ff", "#f3c"],
"editor.tokenColorCustomizations": {
"[Darcula]": {
"textMateRules": [
{
"scope": ["constant.keyword.clojure"],
"settings": {
"foreground": "#9876aa"
}
}
]
}
},
"workbench.colorCustomizations": {
"statusBar.background" : "#1d3241",
"statusBar.noFolderBackground" : "#212121"
},
"workbench.commandPalette.preserveInput": true,
"workbench.quickOpen.preserveInput": true,
"diffEditor.ignoreTrimWhitespace": false,
"window.openFoldersInNewWindow": "on",
"calva.clojureLspPath": "/usr/local/bin/clojure-lsp",
"workbench.colorTheme": "Darcula"
}
Could be that the keywords are not scoped as keywords. There's a developer tool in VS Code for checking what scopes are applied. Something inspect something scopes (I don't quite recall 😄).
seems like it, how can I fix that?
By PR. But I'm not sure about the implications. There are reasons we're not using keyword scope. Iirc most themes make them hard to see by default.
not sure if I understand, we have to change the calva code to get it back?
I was assuming it was there from the docs, its something that changed?
https://calva.readthedocs.io/en/bundle-clj-kondo/customizing.html#keyword-highlighting
Oh, wow. That's some old docs site. 😃 I should take it down. It's all on http://calva.io now, FYI.
Anyway, to avoid that all users had to add those settings, I choose another scope to make keywords more visible by default.
variable.other.constant.clojure
seems to be the one?
Yes, but I'm guessing from the name that we might be using the same for some literals. So you can't currently target keywords specifically.
You seem to have found some old branch build of the readthedocs, bundle-clj-kondo
. Which I can't even remove... Did you find the page from google?
thanks for the info, this one seems to work for now, would be great to have a dedicated one for keywords since they are such an important part of Clojure (and as a Cursive user I got used to have those, to me they help a lot for reading the code)
and yes, I found though Google
Agree it would be great with a dedicated one, but it is a lot to ask of every theme maker that they care about Clojure keywords.
we could use variable.other.constant.clojure.keyword
this way it can still fallback to generic other constants when not explicitly defined
I just realized that clojure-lsp might have solved the original problem for us, so we can probably go back to using just constant.keyword.clojure
. Not 100% sure, but I do think so. Created an issue for it. https://github.com/BetterThanTomorrow/calva/issues/1571
@U0ETXRFEW I think I'm having some issue to reach the data from Calva, VSCode says there is an update, but the logo image doesn't load, and on trying to update it fails, any chance something is wrong with the hosting?
(I dunno if the hosting is from Microsoft directly or something else)
manual download worked 🤷
and fix confirmed, highlighting using constant.keyword.clojure
🎉
Hello.. sorry if this is too beginner of a question. My calva stopped responding and I don't know why. Alt-Enter doesn't do anything anymore. I am jacked in and don't see any errors in the calva log. Is there someplace I should look?
Could it be that there is an evaluation running already that hasn't completed? Try the Interrupt running evaluations command. (Sometimes you might need to issue it twice, I think.
Thanks! I tried that but nothing changed. Also, hovering on any code just shows "Loading..."
Okay I can replicate this by restarting VS Code. In my project I have a defrecord
which uses a protocol. When I change a function on the record from (hc [this] "some hiccup")
to (hc [this] [:a {:href "/"} "Something"])
the parens matching and highlighting stops working
Works here. Probably something else in your file in combination. See if you can minimize the repro.
I've been updating the structural editing in the previous release. So if you can try see if you have the problem with version 2.0.246 of Calva, we can see if it is a regression.
Ok, so I started with the contents of core.clj
core copy.clj
is what I want to change it to
When I start typing on line 8 the problem happens.. maybe after the [:a {
Do you have the problems with this text?
(ns example.core)
(defprotocol MyProto
(hc [this] "some hiccup"))
(defrecord anchor [href title]
MyProto
(hc [this] [:a {:href "/"} "Title"]))
When I change it from (hc [this] ""))
to what you posted there.... the problem happens
There are some funny characters in the text you pasted. I'm trying to figure out if those have anything to do with it.
But I can't reproduce even with those characters still there, so it's probably not what is causing this.
If I download the first file instead of copying the text, I don't get the funny characters. But still can't provoke the error...
We know it is there. You don't have the problem with 246 but it's there with 248. But I don't have a clue how to fix it if I can't reproduce... Hmmm.
Actually for me it happens when I load up core.clj. Backspace over the double quotes in line 8, then type [
and it happens
I am able to reproduce now. If I turn bracket auto-closing off. It starts looking like this and structural editing is completely dead.
This is my smallest repro now:. The vertical bar is the cursor.
([{|)
backspace
BOOM. Now Calva is essentially dead.Dear Calva friends, please be aware that we have a rather critical regression in v2.0.247 and v2.0.248. See this issue: https://github.com/BetterThanTomorrow/calva/issues/1573
@U0ETXRFEW are there any specific functions you want me to look at or is it just overall look things over in that file?
It is the backspace function I am mostly suspecting. But I now tried with the commit just before my changes and with your changes still there and then things don't hang, so this regression happens somewhere in my changes.
ahhhh ok
do you want any help debugging?
ok, I was not aware of the auto-closing brackets option. It's probably on the default for 2.0.248
@corasaurus-hex yes, that would be awesome. Though I am getting pretty tired here because late. Can we maybe have a short chat so I can introduce you to the problem area?
so far I'm unable to recreate it
I've now released Calva 2.0.249 which reverts the metadata change for now. The hang is too severe and I think it is hitting people out there that we don't hear from. Let's hope we can find the source of the error quickly. • @daslu you'll need to use 248 on that meeting then, unless we have a fix before that • @wilkerlucio this reverts the grammar scope change as well. I am too stressed up to figure out a way to cleanly revert only the metadata change.
With some wonderful help from @corasaurus-hex we are slowly narrowing this down. I updated issue 1573 with the latest findings. https://github.com/BetterThanTomorrow/calva/issues/1573#issuecomment-1058912737 Now I need to work for food so won't be able to pick this up until tomorrow.
Fixed in development now. 🎉 https://github.com/BetterThanTomorrow/calva/issues/1573#issuecomment-1059712755 Releasing soon. Thanks @corasaurus-hex! ”Do you want some help?” Is such a magical and wonderful question. 💜
Great! 🙏
Dear Calva friends, please be aware that we have a rather critical regression in v2.0.247 and v2.0.248. See this issue: https://github.com/BetterThanTomorrow/calva/issues/1573
I've now released Calva 2.0.249 which reverts the metadata change for now. The hang is too severe and I think it is hitting people out there that we don't hear from. Let's hope we can find the source of the error quickly. • @daslu you'll need to use 248 on that meeting then, unless we have a fix before that • @wilkerlucio this reverts the grammar scope change as well. I am too stressed up to figure out a way to cleanly revert only the metadata change.
With some wonderful help from @corasaurus-hex we are slowly narrowing this down. I updated issue 1573 with the latest findings. https://github.com/BetterThanTomorrow/calva/issues/1573#issuecomment-1058912737 Now I need to work for food so won't be able to pick this up until tomorrow.
Fixed in development now. 🎉 https://github.com/BetterThanTomorrow/calva/issues/1573#issuecomment-1059712755 Releasing soon. Thanks @corasaurus-hex! ”Do you want some help?” Is such a magical and wonderful question. 💜