Closed deathaxe closed 7 years ago
1) This is good. Edit: Actually, I'll have to think about this more.
2) I'm not sure about this. Expanding the value scope beyond the actual value includes matching comments and whitespace, which aren't actually part of the value and I like how precise the scopes are. On the other hand, if the value is a mapping or a sequence, whitespace within that gets scoped (which makes sense and shouldn't be debated here).
An alternative would be to add a meta.expect-comma
scope for the region after the value and the comma, including the latter. I believe that better matches our intent.
3) 👍
4) I specifically didn't exclude value scope because it breaks key completions in project files, where the entire settings dict is a value itself already. We might have to anchor VALUE_SCOPE to a settings mapping meta scope.
meta.expect-comma
, too. Would fit into the system. Not sure where and how to do changes to not break anything when adding something like that. I think the meta scopes tend to become too detailed and small.meta.mapping.value
stuff. Maybe its a good idea in general to create language specific meta.key
and meta.value
scopes instead of relying on json. This way JSON compatibility would be kept but the more specific needs of certain languages could be addressed.Don't worry, I have ideas about solving 2 and 4. I also wrote the imo well-structured albeit complex Sublime JSON definition, so I know where the I need to insert the new contexts.
Might only get around to doing it tomorrow, though.
well-structured albeit complex
It introduces interesting structures I've not seen anywhere else so far. I like the way you base anything onto JSON and reduce the repetition of matches/scopes. But it comes a long with quite a couple of complex structures - that's right.
Fixed in f0bc60dba641c76240ae782d2e7fbc6082471dc2.
This commit fixes #174 with following changes.
invalid.illegal.expected-value
to enable value completion in empty region between: ,
.