Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting for the editing tooltip #3129

Open
Oxygels opened this issue Jan 15, 2024 · 1 comment
Open

Syntax highlighting for the editing tooltip #3129

Oxygels opened this issue Jan 15, 2024 · 1 comment
Labels
FeatureRequest upstream-vscode Issues that are by problems in VS Code itself.

Comments

@Oxygels
Copy link

Oxygels commented Jan 15, 2024

Is your feature request related to a problem? Please describe.
We have syntax highlighting for the "hover tooltip" such as
image

However the "editing tooltip" hasn't the syntax highlighting unfortunately and that's the purpose of this request
image

Describe the solution you'd like
An identical behavior between the hover and the editing tooltip

Describe alternatives you've considered
/

Additional context
C# Dev Kit doesn't have this feature, and neither does the old python LSP.
This is kinda "rare" for LSPs to have this enabled but it is a great QoL feature to have.

@gopherbot gopherbot added this to the Untriaged milestone Jan 15, 2024
@hyangah
Copy link
Contributor

hyangah commented Jan 17, 2024

Looks like our language server already provides markdown format of the documentation property.

The info like func(a ...any) (n int, err error) is supplied as detail property of completion item https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem or https://code.visualstudio.com/api/references/vscode-api#CompletionItem. Rendering of the information is done by the VS Code. Please open an issue to microsoft/vscode repo. Strictly speaking, from VS Code's point of view, detail isn't necessarily a code snippet.

Alternatively, I think gopls can try to embed the symbol info in the markdown documentation field as done for hover, and skip the detail field, but we need to be careful about unexpected side effects.

@hyangah hyangah added upstream-vscode Issues that are by problems in VS Code itself. FeatureRequest labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest upstream-vscode Issues that are by problems in VS Code itself.
Projects
None yet
Development

No branches or pull requests

3 participants