Fork me on GitHub
#lsp
<
2022-04-15
>
andy.fingerhut16:04:58

I was interested in what language(s) that clojure-lsp is implemented in. Also, when one installs Calva on VScode, does that automatically install clojure-lsp, too? And if so, how is that done? I'm happy to discuss in a thread on this question to avoid polluting the top level chat too much. Especially since my main reasons for asking are to figure out whether I want to take on a project of writing an LSP for a different programming language. If I did take on that project, I wouldn't mind considering Clojure or ClojureScript as a language in which to write such an LSP.

ericdallo16:04:46

Clojure-lsp is written in clojure, using lsp4clj lib When calva opens a clojure project,.it downloads latest clojure-lsp release automatically that tis compiled with graalvm

ericdallo16:04:12

You should take a look at lsp4clj

ericdallo16:04:44

That uses lsp4j under the hood, but we have ideas of implementing whole lsp4j in clojure inside lsp4clj

andy.fingerhut16:04:43

I just found the clojure-lsp page where it mentions GraalVM, and that this is used to build a binary that can run on multiple OS's. Nice. (this page - https://clojure-lsp.io/building/ )

๐Ÿ‘ 1
andy.fingerhut16:04:19

I would guess GraalVM must generate different binaries for different OS's?

andy.fingerhut16:04:09

And when installing Calva on VSCode, it just picks the latest clojure-lsp for the OS on which VSCode is currently running?

ericdallo16:04:19

We have a install script on the root of the repo too that

andy.fingerhut16:04:27

Cool. And thanks for the quick and informative replies!

ericdallo16:04:44

You're welcome, LMK if need any help

andy.fingerhut16:04:31

Do you know if instaparse compiles with GraalVM these days? Or have a recommendation on other context-free parsing libraries that work with GraalVM compilation?

ericdallo16:04:50

I don't know, maybe someone from #graalvm could know

andy.fingerhut16:04:59

I can check there. Thanks again.

Lukas Domagala17:04:18

@U0CMVHBL2 I'm using lsp4clj at work to write an lsp server for a custom language. Just so you know it's possible

Noah Bogart17:04:48

Whatโ€™s the language?

andy.fingerhut19:04:01

For me, the language I might be creating an LSP server for is called P4: https://p4.org. Very small niche language for programming devices like network switches and NICs for the "fast path" of data packet handling.

๐Ÿ‘ 1
andy.fingerhut19:04:45

I wish someone else would write one, but no takers so far ๐Ÿ™‚

Lukas Domagala21:04:23

Ours is a markdown based DSL

ericdallo18:04:28

FYI Emacs users: pushed a new command to lsp-mode: lsp-clojure-server-log which will bring a buffer tailing clojure-lsp log, quite handful

๐Ÿ‘ 3
๐Ÿ™ 9