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

Module descriptor syntax coloring should be improved #1384

Closed
anthonyvdotbe opened this issue Apr 12, 2020 · 3 comments · Fixed by #2161
Closed

Module descriptor syntax coloring should be improved #1384

anthonyvdotbe opened this issue Apr 12, 2020 · 3 comments · Fixed by #2161

Comments

@anthonyvdotbe
Copy link

The module name has a strange coloring, with everything till the first dot green, and the rest white.
Comments inside the declaration are not colored.

Environment
  • Operating System: Windows 10
  • JDK version: 14
  • Visual Studio Code version: 1.44.0
  • Java extension version: 0.59.1
Steps To Reproduce
  1. create a module-info.java file with the following contents:
/**
 * ok
 */
module com.foo.bar {
// not ok
/* not ok */
    requires java.base;
    
}
// ok
/* ok */
Current Result

image

Expected Result

The module name should be all white (since that's the coloring of module names inside the declaration).
Comments inside the declaration should be colored as such.

@0dinD
Copy link
Contributor

0dinD commented Jan 10, 2021

The coloring of module names will be fixed by eclipse-jdtls/eclipse.jdt.ls#1641 and #1760, but the comments inside the module declaration still require an upstream fix to the Java TextMate grammars.

@0dinD
Copy link
Contributor

0dinD commented Oct 8, 2021

Now that atom/language-java#246 is merged, one would think that this issue can be closed. Indeed, that fix made it into VS Code 1.54.0 via microsoft/vscode@b37252c. But the problem is that this extension embeds an older version of the same TextMate grammar (see #1638), which doesn't include the fix, but still overrides the new version included in VS Code. The end result being that comments in module declarations are still not highlighted (the remaining part of this issue).

One solution would be to simply update the included TextMate grammar included in this extension. Another solution would be to stop embedding the grammar and let VS Code provide it instead (since it now has the more recent version).

@fbricon
Copy link
Collaborator

fbricon commented Oct 11, 2021

then we should stop embedding the grammar. It was never meant as a long-term solution, just a fix until the grammar was fixed upstream (in vscode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants