Add label for scheme contributions#315
Merged
JPinkney merged 2 commits intoredhat-developer:masterfrom Jul 16, 2020
Merged
Conversation
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
JPinkney
approved these changes
Jul 15, 2020
Contributor
JPinkney
left a comment
There was a problem hiding this comment.
In general, it looks good to me. Is there any way I can try this out?
Collaborator
Author
|
@JPinkney Yes, you can try with k8s extension, try to provide scheme for some custom CRD. If you provide label, your scheme should be used. |
bleach31
pushed a commit
to bleach31/vscode-yaml
that referenced
this pull request
Jan 25, 2022
* redhat-developer#283 use space for completion text instead of tab Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Add missing 'copied from' comment, remove unused import Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Avoid using 'any' Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Fix getting indentation Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com> * Add changelog Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case when two(or more) extensions wants to contribute JSON Scheme for same file, we need a way to chose which scheme LS will use. This PR solve that problem by adding additional optional parameter for
registerContributormethod.That parameter is
label, it should contains yaml key value pair, that pair will be used to check file content and LS receive only one JSON scheme, if label is match.Fix: redhat-developer/yaml-language-server#267