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

Enable json language support for code-snippets files #204090

Merged
merged 4 commits into from Feb 5, 2024

Conversation

RedCMD
Copy link
Contributor

@RedCMD RedCMD commented Feb 2, 2024

Re-enables the json-language-features extension on snippet files
after it was broken with #189176

Fixes #203206

uses the new jsonLanguageParticipants feature from #198583

"main": "" is required because "extensionDependencies": [ "vscode.json-language-features" ] does not start the json-language-features extension without it

"activationEvents": [] is there because when publishing an extension it is required when "main" is present
Manifest needs the 'activationEvents' property, given it has a 'main' property.

@aeschli
Copy link
Contributor

aeschli commented Feb 2, 2024

Sorry, only now I realize that snippets was added as new built-in language.

json is a basic language extension and must not depend on the json-language-features which is a rich language extension.
They typically run on different extension hosts. The basic language extension is purely declarative and can run on the UI extension host also on the Web

The proper setup would be to create a rich extension snippet-language-features to do that activation. But we don't want to go there for the built-in extensions.

For now, I suggest adding it as a known language to the json-language server and not yet use the jsonLanguageParticipants contribution point.

Was snippets the main motivation for the PR that added the jsonLanguageParticipants ?

@aeschli aeschli added this to the February 2024 milestone Feb 2, 2024
@RedCMD
Copy link
Contributor Author

RedCMD commented Feb 2, 2024

The main motivation was for my own personal extension
however I knew it could have been a possible fix for this issue

@aeschli aeschli merged commit 212e24f into microsoft:main Feb 5, 2024
6 checks passed
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.

[regression] no language support for snippet files
4 participants