lsp

skylize 2025-01-02T21:16:28.300079Z

As discussed https://clojurians.slack.com/archives/CBE668G4R/p1735848670909829?thread_ts=1735842691.320799&cid=CBE668G4R, code completion of functions shows a popup next to the suggestion list, with a docstring + http://clojuredocs.org examples. I find these popups flashing on and off while I type to be a massive distraction, and they often cover up code I'm trying to reference. Apparently these completion popups are provided by LSP. Is there a way I can disable them? or even better, reduce them to simply a function signature?

skylize 2025-01-02T21:17:23.868819Z

ericdallo 2025-01-02T23:18:11.063709Z

I think this is the completionItem/resolve LSP method, at least for Emacs it's manually triggered by user, só I'd expect a client way to trigger or disable that

skylize 2025-01-02T23:19:56.731239Z

Since I'm using #calva, Emacs stuff doesn't much help me. Haha

ericdallo 2025-01-02T23:20:46.457549Z

Yes, I know, I meant this is probably something Calva or vscode should have as option

skylize 2025-01-02T23:21:15.462949Z

@pez ^ ideas there?

skylize 2025-01-02T23:24:14.032189Z

Seems like if Calva can handle it, makes sense to just tie it to the same toggle as parameter hints docstrings.

pez 2025-01-02T23:26:03.501689Z

@ericdallo On Emacs, how do you trigger the docs on the completions? On VS Code it just happens. We don’t find any way to disable it.

pez 2025-01-05T08:28:05.378829Z

I don’t think there is a way to disable it in VS Code. Probably the issue should be also filed there.

skylize 2025-01-05T10:17:35.353589Z

Umm. I don't understand that statement. If LSP wasn't providing it, it couldn't be there. Interrupt the process of providing it and it must go away. There is "a way". Whether it's practical and/or worth the effort might be another question. But there is most certainly a way. Maybe just leave the issue open for a while so it bugs you, and see if you don't stumble onto the answer. 😉

skylize 2025-01-05T10:19:08.694429Z

Maybe it does need to be server side somehow, even though it theoretically makes more sense to be handled by client. 🤔

pez 2025-01-05T10:40:01.631879Z

The issue doesn’t bug me at all. I’m glad it’s there. Even if I don’t see myself spending time on trying to fix it.

pez 2025-01-05T10:41:28.592009Z

I think it’s a bit weird that VS Code seems to not allow for disabling the extra information. It should be opt-in as I see it. If I want a gorilla with my banana, I should be required to say so.

skylize 2025-01-05T14:40:17.877799Z

Agreed.

skylize 2025-01-05T14:40:26.435229Z

Well if you happen to think of not-too-crazy way to fix it, please at least leave a note about it in the issue.

pez 2025-01-05T15:05:32.437319Z

We have a couple of crazy interceptions of clojure-lsp features in place. You can have a look and see if we can apply to this one.

skylize 2025-01-05T15:07:14.836359Z

I'll try to do that. What to do? just search for "lsp" and see what I find?

pez 2025-01-05T16:03:51.238529Z

The lsp code is pretty contained: https://github.com/BetterThanTomorrow/calva/tree/published/src/lsp

ericdallo 2025-01-04T19:14:49.569919Z

@pez via C-h on emacs, via company. I can think how this should be a option in server side as server only respond to a resolve request given the information it was requested, this should be solved on client side, as the problem is not resolving the item, but the automatic way of showing extra details for a completion item

skylize 2025-01-05T00:21:54.627889Z

Went ahead and made an issue for this on Calva so it can be tracked. https://github.com/BetterThanTomorrow/calva/issues/2693