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

feat(modeline): Modeline takes precendence over registerContributor API #806

Conversation

jpinkney-aws
Copy link
Contributor

What does this PR do?

Problem:

  • Right now, when a file is watched by the registerContributor API a user has no way of overriding that schema. In certain cases, a user may want to override the schema provided by the registerContributor API on a file by file basis.

Solution:

  • Make the modeline become a higher priority then the registerContributor API. That way users have the ability to always override the schema for the given file.

What issues does this PR fix or reference?

aws/aws-toolkit-vscode#3012

Is it tested? How?

Problem:
- Right now, when a file is watched by the registerContributor API a user has no way of overriding that schema. In certain cases, a user may want to override the schema provided by the registerContributor API on a file by file basis.

Solution:
- Make the modeline become a higher priority then the registerContributor API. That way users have the ability to always override the schema for the given file.
@justinmk3
Copy link

Any documentation/readme updates needed?

@hoffa
Copy link

hoffa commented Nov 29, 2022

For context, this is affecting aws/serverless-application-model#2645

@gorkem
Copy link
Collaborator

gorkem commented Dec 12, 2022

Hey, welcome back @jpinkney-aws :)

The suggested priority order makes sense. I will review it ASAP but can you also add a note to the README that modeline will override the extensions?

@gorkem gorkem self-requested a review December 12, 2022 01:05
@coveralls
Copy link

coveralls commented Dec 12, 2022

Coverage Status

Coverage increased (+0.05%) to 83.055% when pulling aa24e5e on jpinkney-aws:jpinkney-aws/schema-priority into 86acf77 on redhat-developer:main.

Copy link
Collaborator

@gorkem gorkem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, may need a rebase but otherwise it is good.

@gorkem
Copy link
Collaborator

gorkem commented Dec 22, 2022

@msivasubramaniaan Can you complete the review for this?

Copy link
Contributor

@msivasubramaniaan msivasubramaniaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msivasubramaniaan msivasubramaniaan merged commit b63cee8 into redhat-developer:main Dec 23, 2022
@jpinkney-aws jpinkney-aws deleted the jpinkney-aws/schema-priority branch January 11, 2023 18:27
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.

None yet

6 participants