Fork me on GitHub
#calva
<
2022-03-03
>
Oscar Fernandez Sierra00:03:35

Hello. I'm trying to test Calva in VSCode, but McAfee antivirus detects clojure-lsp.exe as a virus:

ericdallo00:03:00

Trust me, it is not a virus 😂

ericdallo00:03:20

Never saw that, not sure there is anything calva or clojure-lsp can do to avoid that

ericdallo00:03:39

Maybe that happens because calva downloads a exe automatically

bringe04:03:50

See if you can tell McAfee to ignore it or that it’s okay.

pez06:03:36

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.

pez06:03:17

It should be configured like so, btw.

"cSpell.languageSettings": [
{
"languageId": [
"clojure",
"plaintext",
"typescript"
],
"allowCompoundWords": false
}
]

👀 1
pez06:03:42

Slack on mobile…

Oscar Fernandez Sierra00:03:53

Has this happened to anyone else?

Oscar Fernandez Sierra00:03:49

Typo in https://calva.io/get-started-with-clojure/ I didn't find any email contact to inform you about the typo

seancorfield01:03:20

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)

bringe04:03:00

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

pez06:03:53

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?

seancorfield06:03:11

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

seancorfield06:03:49

(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)

seancorfield06:03:33

My school was like Hogwarts -- hundreds of years old, four houses, sorted by academic and sporting ability, very strict, everyone used surnames only 🙂

🏰 1
wizard 2
pez06:03:50

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

pez06:03:33

Maybe I should check the problems count now that I have fixed the configuration.

pez08:03:53

Now fixed. Thanks!

Stuart10:03:31

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

pez11:03:30

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!

Oscar Fernandez Sierra12:03:26

@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

pez12:03:34

Haha, yes, it's a joke I can't resist making. 😃

pez12:03:52

And I should fix the README's and such as well. I mostly focused on http://calva.io stuff.

wilkerlucio13:03:45

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?

wilkerlucio13:03:13

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"
}

pez13:03:42

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

wilkerlucio14:03:40

seems like it, how can I fix that?

pez14:03:13

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.

wilkerlucio14:03:44

not sure if I understand, we have to change the calva code to get it back?

wilkerlucio14:03:02

I was assuming it was there from the docs, its something that changed?

pez14:03:20

Which docs are you referring to?

pez14:03:48

Oh, wow. That's some old docs site. 😃 I should take it down. It's all on http://calva.io now, FYI.

👍 1
pez14:03:24

Anyway, to avoid that all users had to add those settings, I choose another scope to make keywords more visible by default.

wilkerlucio14:03:35

variable.other.constant.clojure seems to be the one?

pez14:03:40

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.

pez14:03:35

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?

wilkerlucio14:03:49

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)

wilkerlucio14:03:53

and yes, I found though Google

pez14:03:51

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.

pez14:03:20

Maybe we can invent a scope, though. I haven't tried that.

wilkerlucio15:03:01

we could use variable.other.constant.clojure.keyword

wilkerlucio15:03:33

this way it can still fallback to generic other constants when not explicitly defined

pez15:03:32

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

pez19:03:29

A new Calva is released with this fix, @wilkerlucio.

🎉 1
wilkerlucio20:03:31

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

wilkerlucio20:03:10

(I dunno if the hosting is from Microsoft directly or something else)

wilkerlucio20:03:33

manual download worked 🤷

pez20:03:57

¯\(ツ)

wilkerlucio20:03:04

and fix confirmed, highlighting using constant.keyword.clojure 🎉

pez20:03:10

Awesome. Thanks for bringing this up!

kevinsl21:03:07

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?

pez21:03:11

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.

pez21:03:08

And there are no too beginner of a questions here. 😃

kevinsl21:03:45

Thanks! I tried that but nothing changed. Also, hovering on any code just shows "Loading..."

pez21:03:05

Does things like structural editing still work? Try slurp or barf, for instance.

kevinsl21:03:24

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

pez21:03:03

Let me try that.

pez21:03:38

Works here. Probably something else in your file in combination. See if you can minimize the repro.

kevinsl21:03:42

Let me know if you want a complete source file that replicates the problem

pez21:03:22

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.

kevinsl21:03:11

great! I was on 2.0.248. After switching to 2.0.246 I don't have this problem

pez21:03:06

Not good. Even if I'm happy you have a solution. 😃

kevinsl21:03:28

well thanks anyway!

pez21:03:52

I really need the repro. If you don't have time to minimize, I can take the whole file.

kevinsl21:03:45

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 {

pez21:03:23

Thanks! Let's hope I can figure this out!

kevinsl21:03:12

you're welcome. thanks for this awesome tool

pez21:03:18

What OS are you on?

pez21:03:40

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"]))

kevinsl21:03:17

yes, the last line

kevinsl21:03:38

When I change it from (hc [this] "")) to what you posted there.... the problem happens

pez21:03:39

Did you copy this and paste it?

kevinsl21:03:24

did you mean when the problem occurred? I was typing when it happened

kevinsl21:03:27

not copy/paste

pez21:03:24

There are some funny characters in the text you pasted. I'm trying to figure out if those have anything to do with it.

pez21:03:01

But I can't reproduce even with those characters still there, so it's probably not what is causing this.

kevinsl21:03:55

what about just using the two files I uploaded?

pez21:03:34

That's what I am doing. I think.

pez21:03:26

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

pez21:03:40

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.

kevinsl21:03:14

hmm, would it help to have a screen recording of my repro?

kevinsl21:03:58

Actually for me it happens when I load up core.clj. Backspace over the double quotes in line 8, then type [ and it happens

pez22:03:00

So you delete the empty string and start typing the bracket?

pez22:03:14

I tried that, but things keep working.

pez22:03:34

Do you have auto-closing brackets on or off, btw?

pez22:03:30

I am able to reproduce now. If I turn bracket auto-closing off. It starts looking like this and structural editing is completely dead.

pez22:03:04

This is my smallest repro now:. The vertical bar is the cursor.

([{|)
backspace BOOM. Now Calva is essentially dead.

pez23:03:26

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

Cora (she/her)23:03:03

@U0ETXRFEW are there any specific functions you want me to look at or is it just overall look things over in that file?

pez23:03:18

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.

Cora (she/her)23:03:55

do you want any help debugging?

kevinsl23:03:08

ok, I was not aware of the auto-closing brackets option. It's probably on the default for 2.0.248

pez23:03:36

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

Cora (she/her)23:03:08

so far I'm unable to recreate it

pez01:03:31

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.

🙏 2
pez07:03:20

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.

👏 5
pez08:03:49

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

🎉 2
💜 4
pez01:03:31

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.

🙏 2