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

fix: missing client markdown capabilities #250

Conversation

sumimakito
Copy link
Contributor

tl;dr This pull request adds the missing clientCapabilities in the YAML worker to fix the broken support for markdownDescription.

It seems monaco-yaml does not set clientCapabilities upon calling getLanguageService, which is exported by yaml-language-server. This causes the doesSupportMarkdown in yaml-language-server always return undefined and makes the markdownDescription not being correctly rendered in the completion item.

I can see clientCapabilities is being set by the test helper in yaml-language-server with a constant imported from vscode-json-languageservice.

Similiar usage in jsonWorker in monaco-editor can be found here: https://github.com/microsoft/monaco-editor/blob/f6dc0eb8fce67e57f6036f4769d92c1666cdf546/src/language/json/jsonWorker.ts#L38

This pull request replaces #248

Copy link

netlify bot commented Sep 22, 2024

Deploy Preview for monaco-yaml ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e29d0b4
🔍 Latest deploy log https://app.netlify.com/sites/monaco-yaml/deploys/66eff35c873fb000081ca50b
😎 Deploy Preview https://deploy-preview-250--monaco-yaml.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@remcohaszing
Copy link
Owner

Thanks! But why did you go with this approach instead of the one in #248? I actually like that one better at first glance.

@remcohaszing
Copy link
Owner

I merged #248 instead.

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

Successfully merging this pull request may close these issues.

2 participants