Closed deathaxe closed 7 years ago
Hmm. I guess you've split the JSON syntax in too little meta.parts with all that meta.expect- ... stuff. Therefore the region_math does no longer work.
Everything between a :
and the ,
was expected to be something like meta.mapping.value
. Now there are three parts. meta.expect-...
, the meta.setting-value...
and the punctuation.separator
afterwards.
For good completions there should be only two meta scopes per line
{
"dpi_scale": 1.0,
^^^^^^^^^^^^ meta.mapping.key
^^^^^ meta.mapping.value
}
By including the :
into meta.mapping.key and ,
into meta.mapping.value one could place the cursor just in front of those separators and would still get the correct meta.scope. Now you don't and you'll need to guess where you are.
Values with space between value and ,
are not handled at all.
:
is not part of the key and ,
is not part of the value. We should not modify the general definition of these meta scopes, which haven't been standardized yet but should be imho, and instead look into finding a way for our unique situation. See #149.
This situation is indeed not unique. When handling completions I had to struggle with the scope boundaries several times already. I am absolutely with you separators not to belong to the key/value in general. But especially with meta scopes you'll run into trouble with that as the position directly in front of ,
is not scoped with the meta of this area anymore which is required for completions.
This is the reason why many default languages started to include the \n
especially in comments, because otherwise you'll get normal completions at the end of each comment line, because ST doesn't know about the comment there.
Something broke the float value completions. The algorithm to detect the prefix
1.
does no longer work which results in wrong completions being added and the completion panel not being displayed automatically.Steps to reproduce
"dpi_scale": 1.
"dpi_scale": 1.1.25