Fork me on GitHub
#lsp
<
2024-01-05
>
Intelo02:01:00

Secondly, how to get multi line eval or type hints like this (rust code)

hiredman03:01:45

language servers tend to do static analysis and are not evaluating anything, single or multi line

hiredman03:01:47

Those are types coming from the rust language server running the rust type checker, clojure is not statically types and does not have a type checker (core.typed exists but cannot type all clojure code and is far from universally used)

hiredman03:01:48

clojure-lsp can deliver linter style warnings for some known cases, but not universal

Intelo03:01:38

Ok, so there is no way to print mult line hints (I see those can be evaluated multiline via conjure+repl) but hints are not multiline

Intelo03:01:43

secondly, this evaluates single line

seancorfield03:01:33

#CK143P6D7 is probably the better place to ask that since evaluation has nothing to do with LSP.

seancorfield03:01:34

(FYI: I deleted your second top-level post since you asked that question again here in this thread)

ericdallo11:01:57

the LSP protocol supports inlineHints, it's exactly what you see with rust (that comes from the rust LSP), but I never found anything useful to show for Clojure, and as @U0NCTKEV8 mentioned I don't know a reliable way to get types without a repl session

practicalli-johnny18:01:30

One way is to use Conjure to evaluate an expression as a comment, there is a specific command or you can paste the result from the register (e I think). Then it is more permanent that the transitory inline eval result. Conjure has the REPL log to see the eval history Or https://practical.li/clojure/data-inspector/portal/ can be wired up to listen to all evaluation results so you can have as much history as you like

seancorfield00:01:41

@U03E8B3CCTV Clojure does not have "types" so there's no such thing as type hints like you've shown here (multiple times).

Intelo03:01:06

@U04V70XH6 I should been more clear. I wanted the eval output as in 4 in 2+2=4 in clojure. That is already there in the picture I posted. I just want it multi line just like the rust picture.

hiredman03:01:44

That is not eval output in the rust screenshot

hiredman03:01:45

And lsp, as has been mentioned over and over in this thread, the language server protocol is not responsible for evaluation

hiredman03:01:10

And a language server that serves up static information or a clojure process that does evaluation both just provide information to your editor, and your editor is responsible for how and when it is rendered, which is why everyone has been pointing you to #CK143P6D7 which is apparently the editor you are using

Intelo06:01:10

yes, thanks. I should have been more clear.

Intelo06:01:17

I will ask in #C03S1KBA2 as suggested

seancorfield06:01:49

#CK143P6D7 NOT #C03S1KBA2