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

Markdown Content not displayed in completion resolve from language server #12684

Closed
AdhamRagabMCHP opened this issue Jul 5, 2023 · 1 comment · Fixed by #12685
Closed

Markdown Content not displayed in completion resolve from language server #12684

AdhamRagabMCHP opened this issue Jul 5, 2023 · 1 comment · Fixed by #12685
Labels
vscode issues related to VSCode compatibility

Comments

@AdhamRagabMCHP
Copy link

Bug Description:

I have made a language server plugin using VSCode’s language server API that can display some documentation for the command/parameter/keyword that we are autocompleting as part of the completion resolve - something like the first image.

The documentation displayed uses VSCode’s MarkupContent type for CompletionItem.documentation, which is analogous to MarkdownString, which is used for monaco.languages.CompletionItem.documentation.

Upon upgrading my Theia version from 1.32 to 1.34, and noticed that for the completion resolve, this MarkupContent is no longer displayed (see the second image).

While trying to diagnose when this changed, I figured out that some change between Theia versions 1.32 and 1.33 is behind this issue seeing as this issue exists in 1.33 - what this change is however, I am still trying to find out.

It is interesting to note that for Hover, documentation also uses this MarkupContent structure from the language server side yet it still displays properly, even though the completionItem resolve does not.

Steps to Reproduce:

  1. Use a language server with known autocompletion and completion resolve features - note that the VSCode built-in Javascript/TS Language server uses strings to display the autocompletion resolve, rather than MarkupContent
  2. Try autocompletion and press on the arrow on the right of the autocompletion item
  3. An autocompletion resolve item should appear - if used on Theia 1.32 and less, something should show up. Any newer version seems to have this bug.

Additional Information

image

  • Operating System: Ubuntu 18.04
  • Theia Version: 1.32-1.33
@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label Jul 6, 2023
@vince-fugnitto
Copy link
Member

vince-fugnitto commented Jul 6, 2023

I narrowed the commit down to c8914a5 (using git bisect), there is likely a converter issue which causes the markdown to not display.

For those interested you can test using the completions-sample-0.0.2.zip plugin (source).

Before:

before-completion.mp4

After:

after-completion.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants