HarlemSquirrel / language-haml

Haml language grammar for GitHub's Atom IDE
MIT License
33 stars 24 forks source link

Can't comment javascript in :javascript sections #66

Closed oceanlewis closed 7 years ago

oceanlewis commented 7 years ago

Not sure what technical limitations you're working with, but attempting to comment javascript using cmd-/ instead prepends the usual -# instead of // to that line. Is this fixable or are you limited to having a single commenting style per filetype?

ezekg commented 7 years ago

Yeah, this issue has always bugged me. I think it's because the comment scopes are set to .text.{LANG} (in our case LANG = haml), while the embedded scopes (what the filters are defined as) is .meta.embedded.{LANG} inside of the .text.haml scope, so it always uses Haml comments. I'll try and dig in soon and see if there's a way I can fix it. Feel free to dig in yourself if you have time!