Support for LSP's Show Document Request #24852
ashishbhate
started this conversation in
Feature Ideas / Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
tl;dr: Please consider adding support for LSP's Show Document Request capability.
The language support protocol added "Show Document Request" in version 3.16.0 of the protocol.
Golang's language server
gopls
uses this ability to tell the client to show package documentation and to browse the compiler generated assembly (amongst other things)See: https://github.com/golang/tools/blob/master/gopls/doc/features/web.md
When the client (in this case, zed) does not support "Show Document Request", gopls falls back to using LSP's
showMessage
ability (which zed does support)See: https://github.com/golang/tools/blob/c0dbb60e4ba78287d76e623a94ae61616ff3c74c/gopls/internal/server/command.go#L1547-L1564
The problem with this is that zed shows the message from

showMessage
as plain text in a dialog at the bottom right of the window.This text is not clickable, so I need to copy it by clicking the copy button at the top right of that dialog, then paste the text in the browser URL, and remove the leading "Doc: open your browser to" part because the copy button copies the whole text. This is a bit annoying :)
VSCode implements the
Show Document Request
capability and directly opens a tab the default browser. It would be great if zed could do this as well.I searched the zed issue's tracker and found #17931
This issue is partially related. The OP in that ticket reported that "nothing happens" because when that ticket was opened zed didn't advertise LSP's
showMessage
capability. Advertising theshowMessage
capability was only added a few months ago - #21924Beta Was this translation helpful? Give feedback.
All reactions