Closed jfcherng closed 4 years ago
I would be excellent if we got syntax errors in this situation, like we do for other errors when we save the file. It should be obvious to anyone paying close enough attention but it slipped past me as I was still learning the syntax.
Ultimately, ST should complain about this problem when parsing the syntax definition as it has a proper parser and knows the types of any structure. I find it weird that it wouldn't complain for this kind of error (which I just checked, it doesn't), so we should probably raise this upstream.
For the record, most other errors, such as forgetting the -
before meta_scope, correctly trigger an error message.
@genericptr is a newbie learning
.sublime-syntax
and he encountered a "weird" situation that his rule was not working at all. (chat: https://discord.com/channels/280102180189634562/280157083356233728/733181451616518184)It took me a while to figure out that he was using a list in
captures
rather than a dict. Or sometimes similarly, people may wrongly dometa_scope:
rather than- meta_scope:
etc...It could be a common mistake and could be hard to find out at the first glance. So I guess it would be good if those dict/list mistakes can be warned.