lsp

Akiz 2024-07-24T14:44:05.147029Z

Is it possible to get same hover documentation (top row) for hiccup form like I do for normal form? This is what I get for [tab-group …]but when I change it to (tab-group ...) then the hover info is consistent with the signature one (bottom row). And I would like to achieve the same with hiccup forms and avoid seeing preceeding with-let in documentation.

ericdallo 2024-07-24T17:37:01.928859Z

not sure it got it, any chance you provide a small code snippet I can try?

Akiz 2024-08-01T11:20:24.143599Z

Thank you. When I understand the problem, I'm less provoked 🙂 .

Akiz 2024-08-01T11:21:47.321859Z

It might be another good “first issue to tackle” if somebody wants / can contribute I guess.

ericdallo 2024-08-01T11:24:35.635239Z

Yes, feel free to create one

👍 1
Akiz 2024-07-30T07:41:05.625209Z

Yeah, I get that. But why is hover different from signature? In minibuffer I see documentation for html because of it, which is useless when I use some react component. So far I’m solving it by writing it inside () and then changing it to [], or displaying the eldoc buffer as in the screenshot. I wonder if it shouldn’t be consistent in this case, because div is correctly interpreted as a function with argument.

ericdallo 2024-07-31T19:31:20.262569Z

Yeah,, I think we evolved hover to support that and I forgot to do the same for signature-help

ericdallo 2024-07-29T12:08:05.077709Z

ah yeah, that happens because clojure-lsp tries to find the current fn being called, which is html and not div although hiccup does this magically under the hood, so the problem is that [div is not a function call, but (div is

👍 1
Akiz 2024-07-27T11:19:59.006239Z

Sure, when you place cursor on div then the hover info is showing info for some-fn and not for div. Signature info is showing info for div.

(defn div [children] (into [:div] children))
(some-fn [div [:b "Test"]])

Akiz 2024-07-27T11:20:01.896179Z