davidrios / jade-tmbundle

A comprehensive textmate / sublime text bundle for the Jade template language.
https://github.com/davidrios/jade-tmbundle
MIT License
102 stars 31 forks source link

Correct scopes for comments #81

Closed mrmlnc closed 6 years ago

mrmlnc commented 8 years ago

Hello, @davidrios,

I think we must understand that a comment is a comment, and not a string. Just buffered and unbuffered comments. For example, JavaScript when block and single-line comments have one scope.

"comment-block": {
    "name": "comment.block.js"
},
"comment-block-doc": {
    "name": "comment.block.documentation.js"
},
"comment-line": {
    "name": "comment.line.js"
}

Also invalid.illegal.comment.comment.block.jade have double comment in scope name.

Before fix (Sublime Text 3 with you package):

image

After fix (Sublime Text 3 with you package):

image

davidrios commented 8 years ago

This is intentional, so you can have a visual indication of what will be a part of the final rendered HTML. Do you have another comment scope that will accomplish that on most color themes?

mrmlnc commented 8 years ago

@davidrios, I think we shouldn't talk here about highlighting, because it's a base scope. For example, buffered and unbuffered comments in Less (LESS.tmLanguage#L145-L178) or Sass (SASS.tmLanguage#L73-L88).

davidrios commented 8 years ago

So, what are the dire consequences of having an incorrectly named scope?

mrmlnc commented 8 years ago

@davidrios, formally - no consequences. In practice, people expect to see color of the comment (if the theme is not adapted for Jade/Pug syntax).

In any case, I just suggested the changes. You can reject it 🐼

mrmlnc commented 6 years ago

Closed as outdated.