calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
stijn 2021-07-01T07:33:04.350100Z

Hi, I'm new to Calva and wondering how you all use the Java integration. I have installed the Redhat Java Support plugin. Code completion works, but e.g. Go to definition does not. Is there something specific to setup in Calva or should I look at the Java plugin for documentation? One thing that is not clear to me is how does e.g. the Java plugin find dependencies etc, since it is obviously not a maven based project.

stijn 2021-07-05T13:40:46.373Z

Thanks, I will take a deeper look to see if sources are installed etc. Does it work for sources of downloaded dependencies as well?

Juλian (he/him) 2021-07-01T08:39:51.351200Z

is there a way to make the calva-repl output automatically hide itself when not needed?

pez 2021-07-01T09:01:16.351300Z

So, what would “not needed” be?

Juλian (he/him) 2021-07-01T09:06:06.351500Z

after eval it should be shown, but when I continue to work on the source, it could be hidden again... for example, I press alt+enter to see the results, but then move the cursor or type something to continue coding, I wouldnt need it displayed any more. maybe I should look up vscode docs

pez 2021-07-01T09:08:49.351700Z

Maybe consider having it always closed. And hover the eval results instead, when you are curious about more about it?

Juλian (he/him) 2021-07-01T09:10:02.351900Z

that sounds reasonable, thanks

pez 2021-07-01T09:34:40.352100Z

There is a keyboard shortcut for showing the hover.

Tomas Brejla 2021-07-01T10:16:58.352300Z

hmm, good question, I'd like to have that feature as well I'm used to show-hide sidebar (ctrl+b), show-hide terminal (ctrl+`), it would be lovely to have similar "dockable panel with calva-repl editor window", assignable to show/hide shortcut) Since calva-repl is just an "ordinary editor", it's probably a question on vs-code itself, whether is offers such functionality.

Tomas Brejla 2021-07-01T10:17:46.352500Z

perhaps it offers something as "editor bookmarks", "favorites" or some similar functionality that could help ? :thinking_face:

pez 2021-07-01T10:23:26.352800Z

The specific ask here was for something automatic. I imagine it would be something like that the output window shows for a brief time after an evaluation, then it should hide.

Tomas Brejla 2021-07-01T10:26:47.353Z

Oh, you're right, there was this ask of automatic hiding. Personally I'd be perfectly fine with custom toggle keyboard shortcut, that would always bring up or hide the same file (output.calva-repl) at the same position in vscode, ie. same behavior as sidebar or terminal

pez 2021-07-01T10:29:09.353200Z

The non-automatic way is to have the output window closed. Then after an evaluation use the command for showing the output window (default bound to ctrl+alt+c o. Then close it, at will. Or, using the hover instead, efter an evaluation use the command for showing the hover, cmd+k cmd+i on Mac, then esc to close the hover.

pez 2021-07-01T10:31:20.353400Z

The VS Code API is super limited, and a bit broken, around controlling where file editors should open. But at least Calva makes an attempt to open the window in the same place as it was last closed from.

Tomas Brejla 2021-07-01T11:46:16.353800Z

I never used ctrl+alt+c o . It does a good job opening the closed repl editor + it swiches focus. But once I press ctrl+alt+c o,again in that repl editor, it opens some "random" editor to the same editor group. Is there any "contract" or expectation of what should happen in this case? I wonder whether it would make sense to change the command in that way, that second press ctrl+alt+c o (ie executed from active repl window) would simply close that repl window? Perhaps it would deserve its own command ("Calva: TOGGLE visibility of the Current open repl.....").

pez 2021-07-01T15:20:59.354200Z

So the command is Show Output/REPL Window when a source file is active, and Show File for the Current Output/REPL Window Namespace when the ouput window is active. Both are default bound to the same keyboard shortcut. Ideally, in the case where the REPL window is active it would activate the tab where that file is already opened, if it is opened, but: > The VS Code API is super limited, and a bit broken, around controlling where file editors should open.

Tomas Brejla 2021-07-01T15:22:53.354400Z

understood, that's a pitty

pez 2021-07-01T15:26:38.354600Z

Here’s the issue, I think: https://github.com/microsoft/vscode/issues/15178

pez 2021-07-01T15:28:00.354900Z

Or, one of them at least.

pez 2021-07-01T15:30:13.355300Z

If you have the REPL window in the same group as the source files (so not side-by-side) it behaves more like a toggle.

pez 2021-07-01T15:33:35.355500Z

Sorry for the radio silence, @stijn. Go to definition should work at least for java “core” stuff, as long as you have the java sources installed. It depends a bit on which Java version you are using. I don’t know how the Java Support plugin interacts with things, but I doubt it is in play for Clojure files.