Fork me on GitHub
#calva
<
2024-04-23
>
Thierry08:04:28

Did having project specific calva.replConnectSequences in the .code-workspace stop working? I moved them to user settings.json and they work again.

pez08:04:08

I don’t think it has been changed anything around that in Calva. If you remember when it last worked you can try both with using a Calva from that time, and with using a VS Code version from that time.

Thierry08:04:41

sure, that was yesterday. will need to check on my laptop

Thierry08:04:32

For reference, current:

Calva version used: v2.0.446
clojure-lsp version used: 2024.04.22-11.50.26
clj-kondo version used: 2024.03.13

Thierry08:04:01

hm, must be something else because Calva version on my laptop is the same

pez08:04:06

And VS Code versions?

Thierry08:04:20

Found the issue, it was behind the keyboard

pez08:04:42

No problem. Glad it works!

Thierry08:04:46

I opened the folder and not the workspace:melting_face:

pez08:04:04

It’s a quite confusing Ux. Though I do not know if it is possible to unconfuse it. The feature is very nice!

Thierry08:04:37

I opened from shell and usually it just works with code-insiders . but this time it didn't so I tried code-insiders .code-workspace and that solved it.

pez08:04:45

You can use some styling of the titlebar and things to easily see when you’re in the workspace. This is what we use in the Calva project:

"workbench.colorCustomizations": {
    "sash.hoverBorder": "#90B4FE",
    "titleBar.activeBackground": "#DB9550",
    "titleBar.activeForeground": "#131722",
    "titleBar.inactiveBackground": "#db9550d5",
    "titleBar.inactiveForeground": "#13172299"
  },

Thierry08:04:08

ohh will have a look at that

Thierry08:04:11

thanks for the tuip

pez08:04:29

Makes it easy to find using alt+tab too.

pez08:04:03

But maybe it’s not so common to have 20 VS Code windows open, like I often have. 😃

👀 1
Thierry08:04:16

not so much lol

Thierry08:04:31

note, for those color customization's to work you also need this setting: _"window.titleBarStyle":_ "custom"_,_

Thierry08:04:09

So, what's a sash ?

pez08:04:05

The divider between panes that you drag to shrink one and grow another. If you paste that setting as it is, you will quickly see what it is. 😃

Thierry08:04:50

:thinking_face:

Thierry08:04:41

found it! haha

dabrazhe14:04:11

I have encountered the following behaviour in VSC when using Calva with babashka. Open a project A in the VSC workspace, eg a Python one. Add a babashka project to the same workspace. .clj-kondo or calva folders are created in the root of the first project A, git suggests adding it to the repo of project A. But I don’t want anything in project A, not even to change gitignore.

pez15:04:28

I’m not sure what can be done about it. Please file an issue and maybe we can figure something out. You can add those to your global gitignore and at least you will not commit the directories to the repo. Though if you have local config that doesn’t work.

pez15:04:48

Also, if other things permit it, it may work placing the babashka project folder as the first folder in the workspace.

✔️ 1
gratitude-thank-you 1
Thierry15:04:33

@pez do you think it's possible to perform this action (see screenshot and snippet below) when Calva Output and Calva Jack-In are both opened as terminal? I do this by hand now. You can set a keyboard shortcut for it. @command:workbench.action.terminal.join +when:terminalHasBeenCreated || terminalProcessSupported

pez15:04:09

Maybe it can be done with https://blog.agical.se/en/posts/vs-code-runcommands-for-multi-commands-keyboard-shortcuts/. Stringing together jack-in and this command.

Thierry15:04:07

will have a look at that tomorrow then

Thierry09:04:01

Do you know what action is needed to press enter in a popup? For instance I trigger an action that creates this input screen at the top but I want it to just auto select and start

pez10:04:56

What action is it? Maybe it takes an argument and when given one will not pop up anything.

Thierry11:04:07

I spent the morning trying everything I could find, my keybindings.json is a mess. Even tried doing it in Joyride without succes. I gave up lol. The command is workbench.action.terminal.join

Thierry13:04:46

I ended up doing this btw:

{
  "key":  "shift+ctrl+alt+n",
  "when": "terminalHasBeenCreated || terminalProcessSupported",
  "command": "runCommands",
  "args": {
    "commands": [
      "workbench.action.terminal.focusNext",
      "workbench.action.terminal.join",
    ]
  }
}

David Yang17:04:06

is there a way in Calva to not remove the last parens in rich comment forms when formatting the file? calva.fmt.keepCommentTrailParenOnOwnLine keeps it on its own line while you’re editing the comment block

David Yang17:04:44

if I add :remove-surrounding-whitespace? false to .cljfmt.edn it works but it’s less than ideal for the rest of the formatting

pez17:04:05

I think I heard that James Reeves is open for adding this kind of formatting to cljfmt. See if you can find an issue in that repo. I place a :rcf keyword inside the closing paren.

Ludger Solbach21:04:13

I just add a ';' on a line before the closing parens, that keeps formatting stable.

Thierry05:04:28

Why would it remove a closing paren? Do you mean it shifts it to the end of the comment block?

Thierry05:04:36

Mine look like this

pez06:04:00

That looks pretty weird, @U02CX2V8PJN 😃

Thierry07:04:20

haha how so?

Thierry07:04:43

Isn't that normal behaviour?

Thierry07:04:09

If I remove the first empty line the trailing parens automatically moves to the end of the last line

Thierry07:04:12

I always add a string "title" to my comments for improved readability when I have all code collapsed

👍 1