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

Incorrect TextMate syntax highlighting for meta category #16438

Closed
tambry opened this issue Dec 3, 2016 · 5 comments
Closed

Incorrect TextMate syntax highlighting for meta category #16438

tambry opened this issue Dec 3, 2016 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) themes Color theme issues

Comments

@tambry
Copy link

tambry commented Dec 3, 2016

image

The names for the parentheses on the first line in the TextMate grammar file are defined as: meta.keyword.bug.parantheses.[...] and on the second line broken's metabug's name is defined as meta.keyword.bug.parameter.metabug.

On all themes included with Visual Studio Code by default don't specify anything about meta.keyword[...], so it shouldn't be highlighted. (Dark+ theme is being used on the screenshot)

  • VSCode Version: 1.7.2
  • OS Version: Ubuntu 16.10

Steps to reproduce:

  1. Clone this reproduction sample.
  2. Open the cloned folder in Visual Studio Code.
  3. Press F5 to run the extension in a new instance.
  4. Open the test.metabug file that's included in the sample's root folder in the new instance running the example syntax support extension.
  5. Witness improper syntax highlighting.
@chrmarti chrmarti added the themes Color theme issues label Dec 5, 2016
@tambry
Copy link
Author

tambry commented Dec 9, 2016

Decided to investigate a bit.

VSCode seems to add the token's name to the end of the upper-level name. Ie. if broken(metabug) as a whole is matched to be meta.workaround.broken.metabug and the broken part of it is matched as keyword.other.broken, then the token's class will be meta.workaround.broken.metabug.keyword.other.broken, instead of what I'd expect to be keyword.other.broken. Ie. the behaviour being that the current-level token overrides previous level token's name.
This might not be whole of the cause, as the CSS matches any token that contains keyword in its name somewhere.

How much of this is the expected behaviour?

@tambry
Copy link
Author

tambry commented Dec 10, 2016

This might be somewhat related to #16206.

@alexdima
Copy link
Member

@tambry It is exactly caused by how we currently render (using CSS to match the scopes instead of carefully following the TM scope matching rules). Let's track in #16438,

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 12, 2016
@tambry
Copy link
Author

tambry commented Dec 12, 2016

@alexandrudima You referred to this very same issue. I think you meant a different issue ID?

@alexdima
Copy link
Member

@tambry Sorry about that, this is where I suggest to track it: #16206

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) themes Color theme issues
Projects
None yet
Development

No branches or pull requests

3 participants