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 #2471: Send json/schemaAssociations notification #2474

Merged
merged 1 commit into from
Oct 10, 2016

Conversation

kaloyan-raev
Copy link
Contributor

@kaloyan-raev kaloyan-raev commented Sep 16, 2016

What does this PR do?

The VS Code's JSON language server expects a json/schemaAssociations
notification to associate JSON files to JSON schemas. This activates
capabilities like code completion, validation and hover without the need
to add a $schema key.

This change implements an extension of the JsonBasedLanguageServer that
registers as ServerInitializerObserver and sends the
json/schemaAssociations notification on the onServerInitialized
event.

What issues does this PR fix or reference?

#2471, #1287

Previous behavior

Code completion, validation and hover capabilities in the JSON editor were enabled only after manually adding a $schema key.

New behavior

The JSON editor automatically associates JSON schema for popular JSON files like package.json, bower.json, composer.json, tsconfig.json, etc. Code completion, validation, hover and other capabilities work out of the box.

PR type

  • Minor change = no change to existing features or docs

Minor change checklist

Signed-off-by: Kaloyan Raev [email protected]

@TylerJewell TylerJewell added the kind/enhancement A feature request - must adhere to the feature request template. label Sep 16, 2016
@TylerJewell TylerJewell added this to the 5.0.0-M2 milestone Sep 16, 2016
@codenvy-ci
Copy link

Can one of the admins verify this patch?

@kaloyan-raev
Copy link
Contributor Author

I rebased the PR to latest master.

@bmicklea
Copy link

bmicklea commented Oct 3, 2016

@vparfonov who needs to code review this PR?

@vparfonov
Copy link
Contributor

@kaloyan-raev can you resolve conflict, please ?

@kaloyan-raev
Copy link
Contributor Author

@vparfonov Sure. I think this conflict is due to the big refactoring #2677 merged a few hours ago.

@bmicklea bmicklea modified the milestones: 5.0.0-M6, 5.0.0-M5 Oct 4, 2016
@bmicklea
Copy link

bmicklea commented Oct 4, 2016

@kaloyan-raev I'm moving this to M6 milestone because we're pushing to get M5 out ASAP.

The VS Code's JSON language server expects a 'json/schemaAssociations'
notification to associate JSON files to JSON schemas. This activates
capabilities like code completion, validation and hover without the need
to add a '$schema' key.

This change implements an extension of the JsonBasedLanguageServer that
registers as ServerInitializerObserver and sends the
'json/schemaAssociations' notification on the 'onServerInitialized'
event.

Signed-off-by: Kaloyan Raev <[email protected]>
@kaloyan-raev
Copy link
Contributor Author

@vparfonov I rebased the PR to latest master.

@vparfonov vparfonov merged commit fbac7ea into eclipse-che:master Oct 10, 2016
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
…pse-che#2474)

The VS Code's JSON language server expects a 'json/schemaAssociations'
notification to associate JSON files to JSON schemas. This activates
capabilities like code completion, validation and hover without the need
to add a '$schema' key.

This change implements an extension of the JsonBasedLanguageServer that
registers as ServerInitializerObserver and sends the
'json/schemaAssociations' notification on the 'onServerInitialized'
event.

Signed-off-by: Kaloyan Raev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. sprint/current
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants