Could it be possible to add a different scope for the double sharp comments?
I'm trying to replicate 1-to-1 the theme from Godot into VSCode. (based on godot-vscode-theme)
But it seems the scope for # commentsand ## comments are the same.
In Godot, the double symbol comments have a slight different color. I'd like to achieve that with a theme.
Edit2:
I've been able to colorize the double comments, and add TODO/FIXME colored keywords inside comments with grammar injections with the theme plugin.
Here are some of the keypoints.
I replaced the 'comment' from using match regex to begin/end
Changed the "comment" to use the "Begin/End" regex instead of "Match"
so it could inject TODO/FIXME scopes inside comments. It wouldn't work when comments were using match.
The other missing color I found is the global vs local function color.
But that is a way more complicated problem that I'm not sure how to solve.
I think it needs a custom semantic token for that.
Godot version
4.2.2.stable
VS Code version
1.87.0
Godot Tools VS Code extension version
v2.0.0
System information
Windows 10
Problem statement
Could it be possible to add a different scope for the double sharp comments? I'm trying to replicate 1-to-1 the theme from Godot into VSCode. (based on godot-vscode-theme)
But it seems the scope for
# comments
and## comments
are the same. In Godot, the double symbol comments have a slight different color. I'd like to achieve that with a theme.Here's the comment grammar location https://github.com/godotengine/godot-vscode-plugin/blob/df445b8390b5575c6e2b63ca7d6bdc1763154604/syntaxes/GDScript.tmLanguage.json#L85-L89
Proposed solution
I've never worked with this, but possibly adding a new grammar entry like: Edit: This works, it can differentiate single and double comments
Adding base_pattern
And
Edit2: I've been able to colorize the double comments, and add TODO/FIXME colored keywords inside comments with grammar injections with the theme plugin.
Here are some of the keypoints. I replaced the 'comment' from using match regex to begin/end
Changed the "comment" to use the "Begin/End" regex instead of "Match" so it could inject TODO/FIXME scopes inside comments. It wouldn't work when comments were using match.
The other missing color I found is the global vs local function color. But that is a way more complicated problem that I'm not sure how to solve. I think it needs a custom semantic token for that.