The current design is based almost entirely off the generic environment pattern, just made specific to comments.
The interior scope is consistent with the textmate manual, as it specifies comment.block as a possible scope.
Benefits
The fairly common (and unambiguous) comment environment will have it's contents correctly scoped as comments, ensuring they appear consistent with other comments and the contents do not interfere with other syntax highlighting.
Possible Drawbacks
I am getting a bug due to 'name': 'meta.function.environment.comment.latex' where the begin and end commands are shown as italic (when using a theme that puts comments in italics; tested with one dark and solarized dark). This is specifically caused by the comment term, and removing it or changing it fixes the issue.
However, this should be a syntax package issue and is not our concern. The pattern should remain with the meta scope, to keep it consistent with other environment patterns.
Description of the Change
Adds support for the
comment
environment.Alternate Designs
The current design is based almost entirely off the generic environment pattern, just made specific to comments.
The interior scope is consistent with the textmate manual, as it specifies
comment.block
as a possible scope.Benefits
The fairly common (and unambiguous)
comment
environment will have it's contents correctly scoped as comments, ensuring they appear consistent with other comments and the contents do not interfere with other syntax highlighting.Possible Drawbacks
I am getting a bug due to
'name': 'meta.function.environment.comment.latex'
where the begin and end commands are shown as italic (when using a theme that puts comments in italics; tested withone dark
andsolarized dark
). This is specifically caused by thecomment
term, and removing it or changing it fixes the issue.However, this should be a syntax package issue and is not our concern. The pattern should remain with the
meta
scope, to keep it consistent with other environment patterns.Applicable Issues
165