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

[plugin] fix #5753: redetect languages on new grammar #5754

Merged
merged 1 commit into from
Jul 23, 2019
Merged

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Jul 19, 2019

What it does

fix #5753: redetect languages on new grammar

How to test

  • clone https://github.com/zxh0/vscode-proto3/tree/master/example/protos/v3
  • open proto file from examples, it should not have coloring
  • run Deploy Plugin by id command -> vscode:extension/zxh404.vscode-proto3
  • verify that an opened file is properly highlighted now
  • it has to happen only if a language was auto-detected
  • if a user changed a language before it should not be reset

Review checklist

  • as an author, I have thoroughly tested my changes and carefully reviewed following the review guidelines

Reminder for reviewers

@AlexTugarev
Copy link
Contributor

Screen Shot 2019-07-19 at 12 09 57

works as advertised!

@akosyakov
Copy link
Member Author

I've updated to redetect only once.

@akosyakov akosyakov added monaco issues related to monaco vscode issues related to VSCode compatibility labels Jul 19, 2019
@kittaakos
Copy link
Contributor

works as advertised!

The second method does not have syntax highlighting.

@akosyakov
Copy link
Member Author

@kittaakos it is already grammar issue, the same in VS Code:
Screen Shot 2019-07-19 at 13 32 43

@akosyakov
Copy link
Member Author

akosyakov commented Jul 19, 2019

@AlexTugarev @kittaakos are you fine with changes? could it be merged?

@AlexTugarev
Copy link
Contributor

AlexTugarev commented Jul 19, 2019

The second method does not have syntax highlighting.

@kittaakos that's due to the problem from L.17 as stated in the comment.

Copy link
Contributor

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

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

works nicely!

/* `true` because it is derived from an URI during the instantiation */
protected _languageAutoDetected = true;

get languageAutoDeteceted(): boolean {
Copy link
Member

Choose a reason for hiding this comment

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

typo, fix: languageAutoDetected

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, sorry, only noticed it, could you open a follow-up PR, it won't be a breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugin] custom highlighting is not applied immediately to opened files
4 participants