Fork me on GitHub
#calva
<
2020-12-22
>
pez07:12:10

@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.

pez09:12:46

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

🙌 3
👍 3
pez09:12:55

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.

pez09:12:16

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

bringe16:12:27

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 😄

bringe16:12:38

> 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.

pez17:12:43

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.)

pez17:12:34

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.

pez17:12:24

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

bringe17:12:07

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)

bringe17:12:09

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

bringe17:12:26

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

bringe17:12:29

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

bringe17:12:02

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

bringe17:12:24

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.

pez19:12:18

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

bringe20:12:23

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

pez08:12:44

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

bringe17:12:18

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