@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.
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
I think I might have merged an old version of the lsp branch. Now will have more up-to-date feedback to provide, hopefully
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
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.
Also, if it is possible, I’d like for the available refactorings to not be “lightbulbed”.
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 😄
> 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.
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.)
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.
To me the lightbulb says “Here is something you should probably fix.”
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)
About the lsp hovers, I disabled lsp hovers, so I'm not sure how you're seeing that (I do not with that vsix)
It should only be displaying Calva hovers, in which case that message makes sense
Here you can see lsp is running (code lens are there), but I'm not connected to a repl, so no hover.
It's really weird if yours is showing hovers somehow - and you are using the vsix linked here?
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
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.
I'm not using the vsix, though. I have merged your stuff on my feature branch.
Oh I see. You may have a different jar of lsp then somehow