lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
ericdallo 2021-02-07T04:37:36.359200Z

:clojure-lsp: Release https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.02.07-03.04.31 add support for a new code action, alias suggestion require 🎉 It'll require a full qualified ns if present on classpath suggesting an alias

littleli 2021-02-07T21:31:09.369100Z

I added clojure-lsp to scoop-clojure here: https://github.com/littleli/scoop-clojure/pull/151 I would do it earlier, but I didn't know it exist. Great project ❤️

ericdallo 2021-02-07T21:32:21.369400Z

Oh, that's great news @ales.najmann, Thank you! We can add a entry for Windows here: https://clojure-lsp.github.io/clojure-lsp/#installation

littleli 2021-02-07T21:40:52.369700Z

Nice 🙂

littleli 2021-02-07T21:42:53.369900Z

btw I have a question what kind of Visual C++ Redistributable library it depends on? Usually there is one if you use native-image. And there is so many of them 😞

ericdallo 2021-02-07T21:44:14.370100Z

Yeah, I don't know exactly which, but I needed to install this one on CI to build successfully for windows: https://github.com/clojure-lsp/clojure-lsp/blob/master/.github/workflows/release.yml#L213-L214

ericdallo 2021-02-07T21:45:09.370400Z

https://github.com/ilammy/msvc-dev-cmd

ericdallo 2021-02-07T21:47:12.370700Z

@ales.najmann probably we should close this now? https://github.com/clojure-lsp/clojure-lsp/issues/28 I think scoop replaces chocolatey right?

ericdallo 2021-02-07T21:47:53.371Z

If scoop is a good package manager to install things on WIndows, we could close that issue after adding docs 🙂 Willing to open a PR?

littleli 2021-02-07T21:51:51.371200Z

Chocolatey is a different project and different approach. I can only speak about scoop installer which I use and I create packages for, and not just for Clojure.

littleli 2021-02-07T21:52:29.371400Z

Let me check how to add docs entry. I'm willing to open PR of course 🙂

ericdallo 2021-02-07T21:52:56.371600Z

Yeah I know, I was just saying that having a good way to install clojure-lsp on Windows, for example with scoop, would be enough to close that issue 🙂

ericdallo 2021-02-07T21:52:59.371800Z

great!

littleli 2021-02-07T21:56:03.372Z

I see 🙂 Yeah, I personally believe scoop way is superior on (native) Windows.

ericdallo 2021-02-07T21:56:21.372200Z

Perfect!

littleli 2021-02-07T22:00:11.372400Z

it seems that this line answers my question: VC++ 2015 Compiler Toolset so it's going to be vcredist2015

ericdallo 2021-02-07T22:00:37.372600Z

Yeah, probably 🙂

littleli 2021-02-07T22:01:18.372800Z

I have to add it otherwise on machine where no Visual Studio is installed there is a good chance that binary would not run.

ericdallo 2021-02-07T22:02:02.373Z

oh, makes sense, I tested on my windows but probably already had that installed

ericdallo 2021-02-07T22:02:26.373200Z

Also, I'd love to hear some windows user if clojure-lsp graalvm binary is working as expected 😉

ericdallo 2021-02-07T22:02:39.373400Z

I didn't test it for windows that much

littleli 2021-02-07T22:03:27.374400Z

I would like to actually start development on Windows in Clojure. But I'm not there yet...

littleli 2021-02-07T22:04:03.374900Z

I believe Windows users (also devs) deserve Clojure 🙂

ericdallo 2021-02-07T22:04:24.375200Z

Sure! You are helping they with your contribution 😄

littleli 2021-02-07T23:19:51.377400Z

PR merged 🙂 my quest is done for now. With another release Scoop automation should take care of the new version and update automatically. I hope. Your versioning scheme is quite different, but should be good I tuned the manifest a bit.

ericdallo 2021-02-07T23:21:45.377600Z

Nice! LMK if need any help, we have a https://github.com/clojure-lsp/clojure-lsp/pull/286 for homebrew too for MacOS users. @andre.peric is hellping with it

littleli 2021-02-07T23:27:43.378200Z

We (as a community) we should start conversation about having own homebrew tap with all the tools so there is no friction in terms of having dedicated tap for every tool. Also it helps people to find tools if they want to know what's new in the ecosystem. But that's a bit offtopic here.

ericdallo 2021-02-07T23:45:32.378400Z

yeah, I agree. But I'not even a Mac or Windows user :man-shrugging:

Alex 2021-02-07T05:28:17.361200Z

Autocompletion seems to be a little inconsistent for me. If I type quickly, it fails to find any suggestions at all. Is that expected? Any suggestions for how I can debug further or adjust any configuration? In the below gif, I type slowly and the suggestions come up in a reasonable timeframe. If I type quickly, I don't get any suggestions

ericdallo 2021-02-07T12:45:25.362200Z

Hey @rahx1t, this is a known issue that happens when your code is "unparseable" (not a valid clojrure code) We have this isssue to track that: https://github.com/clojure-lsp/clojure-lsp/issues/270

ericdallo 2021-02-07T12:45:55.362500Z

Basically, if you try to complete something like set/ it'll not work, but set/u it will

ericdallo 2021-02-07T12:46:24.362700Z

Not sure @borkdude has any suggestion here

Alex 2021-02-07T16:39:08.364400Z

Thanks Eric for the quick response! I'm not sure the linked issue fully explains the behavior I'm seeing -- sometimes set/ will return matches and sometimes it will not. In both cases wouldn't it be treated as unparseable code? What would explain the different behavior?

ericdallo 2021-02-07T16:40:19.364600Z

Are you using Emacs with lsp-mode?

ericdallo 2021-02-07T16:40:57.364800Z

• lsp-mode caches the results if on same line/ same code to complete • you are using CIDER repl with override lsp completion I think

Alex 2021-02-07T17:24:50.365600Z

Yep! Using lsp-mode on Emacs. I've been trying to get the LSP experience right so I have been intentional about not connecting to CIDER.

ericdallo 2021-02-07T17:26:18.365800Z

Yeah, so that should be probably the lsp completion cache, it finds the completion while you are typing, that s why some times works before you type the slash

Alex 2021-02-07T17:27:43.366Z

Oh interesting. So the LSP completion cache also explores the set namespace before I've typed the slash?

ericdallo 2021-02-07T17:28:39.366200Z

Yeah, if what you typed has more characters than company-min-length then lsp-mode will request completion items

ericdallo 2021-02-07T17:28:47.366400Z

You can disable this behavior also

Alex 2021-02-07T17:35:55.366600Z

Oh cool, thanks. I think this all explains the behavior I'm seeing. When I type too quickly and get to the unparseable code state, LSP-mode did not yet have a chance to request any completion items and once the code is unparseable, it cannot request any completions; when I type slowly, LSP-mode is able to request some completions before it gets to the unparseable state and once the code is unparseable, lsp-mode can still use results from the LSP completion cache. Is my understanding correct?

ericdallo 2021-02-07T17:36:32.366800Z

That's exactly how it works 🙂

🙏 1
ericdallo 2021-02-07T19:33:41.367900Z

:clojure-lsp: We improved documentation about all available features 😄 Check it out: https://clojure-lsp.github.io/clojure-lsp/features/

2
🎉 3
ericdallo 2021-02-07T22:03:37.374800Z

clojure-lsp reached 500 on GitHub 🎉 :clojure-lsp:

4
1
🤘 5
ericdallo 2021-02-07T23:00:36.377100Z

Also, FYI, clojure-lsp issues were reduced by half after clj-kondo integration @borkdude 😄

🎉 5