Fork me on GitHub
#calva
<
2022-11-14
>
Yuner Bekir11:11:03

For some reason the repl starts mixing up the colors, could someone suggest a fix?

👀 1
pez12:11:04

This is probably clojure-lsp which isn't picking up that the file has changed from ”underneath” (e.g. som git activity). What I do is that I enter a character and undo it. Then clojure-lsp refreshes its tokenization.

Thierry08:11:08

I'm having the same issue and was just about to ask how I can fix it.

Thierry08:11:49

On the repl:

alekszelark09:11:06

I believe this is the old one I reported a few year ago

alekszelark09:11:09

there is a workaround for that

Thierry09:11:34

Oh do enlighten me about that, its really annoying

pez09:11:48

It's two different bugs with similar symptoms. See here for a workaround for the two issues pasted last in this thread: https://github.com/BetterThanTomorrow/calva/issues/761#issuecomment-769960585

Thierry09:11:57

I see that I already have that enabled. Going through the vscode addons atm to see if theres something else trying to color the code aswell

Thierry09:11:13

Ill keep that in mind and try the character adding and undoing.

pez09:11:26

You could disable semantic tokens to confirm that this is the problems. Personally I prefer the glitches over having that disabled.

Ben Lieberman15:11:31

Hopefully I'm not mistaken that this is a Calva thing but when I am using clojure.core/test , it offers to autocomplete the body of deftest for me. When I hit enter, it fills in the body but also wraps the whole deftest in an extra set of parens. That is not to be expected right?

Ben Lieberman15:11:43

Output like this:

((deftest name-test
      (testing "Context of the test assertions"
        (is (= assertion-values)))) )

skylize15:11:59

I get the same. I am guessing a bug here. For workaround you can type your hotkey for Calva Paredit: Splice Sexp to remove the extra parens.

Ben Lieberman15:11:05

Cool, that's a new shortcut for me. Finally getting a hang of the structural editing and it is 👌

skylize16:11:27

Splice is super helpful in so many cases. Good one to learn. It splices the current form contents into its parent. Or put more simply, it removes the innermost bracket/paren/quote pair surrounding the cursor.

pez17:11:04

I don’t know were this issue is, really. clojure-lsp provides that snippet. But I think it is VS Code that wraps it. Or something.

Ben Lieberman17:11:27

Okay, @U0ETXRFEW. I'll drop a line into #CPABC1H61 and maybe put in a bug report

Ben Lieberman17:11:31

Thank you!

🙏 1
skylize15:11:26

How do I clear inlined test output?

pez17:11:45

Do we have that? Can you show a screen shot?

skylize17:11:47

Is none that from Calva? Only other likely source I can think of is Error Lens, but this screenshot was taken after disabling that and restarting.

bringe05:11:31

That’s from Calva’s test runner. You can run the “Test: Clear All Results” command.

pez06:11:18

Right, so I got the wrong picture in my head about ”inline”. (Which probably is the correct word for it, this was just me. 😀) Adding a screenshot to @U9A1RLFNV’s answer.

skylize13:11:08

> “Test: Clear All Results” command. That's what I was looking for. 🙏

skylize13:11:57

Is there a way to clear/refresh the Test Explorer? Seems to get filled up with stale entries when editing the names of tests.

pez13:11:01

It could be that Calva needs to implement some more of the API for this. I don't know, tbh. @U0K592YDP knows most about it. Unfortunately he's not working with Clojure these days, so it might be that we need to investigate this ourselves.