Fork me on GitHub
#calva
<
2022-10-21
>
seancorfield02:10:38

For anyone using Portal, here's my latest config for REPL snippets, aliases, and how I start a REPL w/middleware...

calva 5
portal 2
zimablue19:10:14

Thanks for this I was admiring your portal snippet in the other thread

Jakub Holý (HolyJak)08:10:42

Hi! Is it possible to hide line numbers for the repl output? They take lot of space and aren't useful for me. I tried to figure it out, but in vain. Speaking of space, when I have repl output below the eidted file, there is also lot of space wasted for the tab list with the file name and the file path below that. Are there some VS Code tricks to minimize/hide those? Ideally I would have only a thin bar between the code and the repl... 🙏 Sometimes I just close the repl output and only use inline result display but sadly some repl operations only report into the output, e.g. if I Load File and it fails, I will not know it until I check the repl output 😭

pez10:10:27

Someone used #C03DPCLCV9N to do this. Search that channel (or if it was this channel) for it. I’m afk, but can help later if you don’t figure it out.

pez10:10:10

Load file failures should pop up an error message, btw. Doesn’t it?

skylize12:10:12

Unfortunately, Code generates absolute widths and heights for things on the fly. So these types of customizations can sometimes be difficult-to-impossible. But there are definitely things you can do by poking around with Dev Tools to work out the right CSS selectors.

pez13:10:41

@holyjak, Running this code in Joyride with the Output-window active disables line numbers for that window:

(set! (.-lineNumbers vscode/window.activeTextEditor.options) 0)
You can define a keyboard shortcut with that code as an argument to the command joyride.runCode. You might need to prepend the code with.
(require '["vscode" :as vscode])

Jakub Holý (HolyJak)13:10:30

Thank you! Regarding the error: no, when I load a file with syntax error I do not see any error popping up.

pez14:10:47

Which version of Calva are you on?

bringe15:10:08

To be clear, the popup should only happen when the output window is closed, I think.

🙏 1
bringe15:10:19

But if that’s not happening for you, maybe there’s an issue.

skylize16:10:16

I think there is no popup for general errors, only when you try to Load/Evaluate Current File. I think installing Error Lens extension is really a better solution here anyway. Perhaps Calva should build in similar features to Error Lens?

Jakub Holý (HolyJak)16:10:26

> To be clear, the popup should only happen when the output window is closed, I think. confirmed and that explains why it is not showing for me, b/c I have the output win open, just small and to the side so I do not see it until I look. Even worse if I have it open but in a non-active tab

pez16:10:07

If it's in a non-active tab, the pop-up should happen.

1
pez16:10:42

> Perhaps Calva should build in similar features to Error Lens? Error Lens is great. Seems Calva would only risk to get in conflict with Error Lens if it overlapped.

pez16:10:50

For clarity: Error Lens does not help with the issue mentioned in OP.

skylize16:10:04

Yeah, I guess loading a file is a bit of an outlier. Error Lens does not have any inline location to place that error.

pez17:10:42

Maybe we could report an error on the location where it happens, and if you have error lens it would highlight there. I've experimented with this a bit a (long) while. I recall I ran into trouble with cleaning up error reports.

skylize18:10:51

Probably not worth it. In most (all? nearly all?) cases, whatever is causing the problem will already be marked up by the linter.

pez18:10:30

Far from it. The linter has no clue if a file is readable or a server started and a lot of things only knowable at run time.

skylize18:10:08

Well if a file is not readable, it's going to trip up the linter, too, right? But yeah, that still ignores runtime errors.

skylize19:10:53

Just brainstorming, we could (instead of loading a whole file): 1. Store the cursor position(s). 2. Step the cursor through the document, running evaluateCurrentTopLevelForm on each top level form. 3. Restore the cursor.

ericdallo15:10:25

I was reading calva docs about *Only use the clojure-lsp config option if you need it* https://calva.io/formatting/ and have a question

ericdallo15:10:47

> clojure-lsp's cljfmt config is special in that it does not support regular Clojure syntax for regular expressions. This can make it difficult to run cljfmt as part of a CI pipline. is that true yet?

ericdallo15:10:58

Also, I feel like that section is really hidden 😅

pez16:10:39

It's not hidden, is it?

pez16:10:10

As for if it is true or not with the regex syntax, I don't know. If it isn't, we should remove that paragraph.

ericdallo16:10:22

Yeah I mean, not easy do find 😅

pez16:10:59

What is not easy to find? And how can we make it easier?

ericdallo16:10:49

I thought about a sub heading instead of a expandable note

ericdallo16:10:56

like About aligning associative forms

ericdallo16:10:36

also *Only use the clojure-lsp config option if you need it* seems confusing and maybe misleading, maybe How to delegate formatting to clojure-lsp

pez19:10:02

The reason it is formulated as it is is because it became a support burden helping people realize that they probably should use a regular cljfmt file instead. But, I'll take a look at the whole page and see if we can structure it better. As it is now it has mostly just grown with new bits and pieces into the shape it has.

👍 1
Célio17:10:22

Calva supports Show Call Hierarchy! Thank you so much :face_holding_back_tears:🙏

clojure-lsp 2
gratitude 2
Brett Rowberry19:10:02

Does anybody use cljstyle with Calva?

👀 1
Brett Rowberry04:10:04

Ended doing a git pre-commit hook

🙏 1