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`.
pez 2020-12-22T07:28:10.316400Z

@cdimara , Calva indirectly uses whatever environment vscode uses. That, in turn, depends on how vscode is started. On my machine I need to start vscode from the command line, otherwise I get some limited environment. There is also jackInEnv if you are using jack-in.

pez 2020-12-22T09:46:46.325400Z

I’ve merged the lsp feature that @brandon.ringe is working on onto the feature branch I am hacking on. Then using the result on my day work project. Loving it. Without starting the project I can peek definitions. But even with the project started, I have new functionality. Like: • an outline • go to symbol in file • go to symbol in workspace (project) • find references • peek definition of local bindings • refactorings (extract function being the most useful for me) • rename symbol (I think of it as a refactoring, even if vscode doesn’t) And probably more that I am missing right now. Major kudos to @snoe for building the lsp. And super nice work of @brandon.ringe leashing it some to fit together with the rest of Calva. There are still some quirks, but it is all very useful and a vast improvement of current Calva. Make your coding days more joyful by using the current VSIX build that Brandon wants help with testing. Calva is about to step its game up significantly. Here’s that VSIX again: https://8976-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.135-feat-lsp-client-ff64b560.vsix

👍 1
🙌 1
pez 2020-12-23T08:40:44.331900Z

I think I might have merged an old version of the lsp branch. Now will have more up-to-date feedback to provide, hopefully

bringe 2020-12-23T17:39:18.343300Z

Yeah I've been very often changing out the jar while tweaking clojure-lsp to try things out, so very possible you merged during an odd time

pez 2020-12-22T09:48:55.325500Z

The only major quirk I notice is double symbol counting in CLJC files. Otherwise it is minor things, like the hover message to start the REPL to peek definitions.

pez 2020-12-22T09:50:16.325700Z

Also, if it is possible, I’d like for the available refactorings to not be “lightbulbed”.

bringe 2020-12-22T16:32:27.326100Z

Thanks, I'll add to my notes. Do you have a particular reason for not wanting to lightbulb? I think some users, especially coming from other languages and who are used to vs code, may like this feature. It seems it should be something that can be disabled in vs code settings, so the user can decide, but I haven't checked. We could probably make a setting too depending on how we make it disable-able 😄

bringe 2020-12-22T16:36:38.326300Z

> the hover message to start the REPL to peek definitions Can you explain this a bit more? I'm not sure I see it. I do see the hover message like that, but that one makes sense, because lsp's hover is disabled.

pez 2020-12-22T17:05:43.326500Z

Before the lsp is ready to deliver info, the hover only display that last message. I don’t think the message should be displayed ever. (Analyzing project, please wait…. makes sense while the lsp is indexing, I think.)

pez 2020-12-22T17:16:34.326900Z

I like lightbulbs, but it needs to be something important. In the screenshot it offers to extract (util/fetch-input 15) to a function, which doesn’t make all that much sense, so I’m thinking that maybe skip lightbulbing “extract function” refactorings. It’s hard to know when it makes sense.

pez 2020-12-22T17:17:24.327300Z

To me the lightbulb says “Here is something you should probably fix.”

bringe 2020-12-22T17:20:07.327500Z

I see what you mean. I'll look into if we can control that easily. I think we can disable codeActions if necessary (I think they're still available by calling the respective lsp command manually, as we would from a Calva command)

bringe 2020-12-22T17:22:09.327700Z

About the lsp hovers, I disabled lsp hovers, so I'm not sure how you're seeing that (I do not with that vsix)

bringe 2020-12-22T17:22:26.327900Z

It should only be displaying Calva hovers, in which case that message makes sense

bringe 2020-12-22T17:24:29.328100Z

Here you can see lsp is running (code lens are there), but I'm not connected to a repl, so no hover.

bringe 2020-12-22T17:25:02.328500Z

It's really weird if yours is showing hovers somehow - and you are using the vsix linked here?

bringe 2020-12-22T17:38:15.329300Z

Here's a link to the latest vsix, which includes the latest release changes: https://9126-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.136-feat-lsp-client-18cce7d6.vsix

bringe 2020-12-22T17:57:24.329400Z

My reasoning for disabling lsp hovers for now mainly is because Java hover content is not implemented in lsp yet: https://github.com/snoe/clojure-lsp/issues/204 I think we can make Calva only provide java hover content, and lsp provide everything else, but this is something I want to push until after an initial release. For now, I'm trying to get everything that works fine already out the door, and everything else can be disabled and worked in later.

pez 2020-12-22T19:19:18.331300Z

I'm not using the vsix, though. I have merged your stuff on my feature branch.

bringe 2020-12-22T20:26:23.331500Z

Oh I see. You may have a different jar of lsp then somehow