Skip to content

Lack of leading digit in front of decimal dot makes decimal dot syntax group wrong #21

@Aster89

Description

@Aster89

The issue is originally posted on Vim: vim/vim#11472

See the coloring of . in the following snippet with and without the 0.

.some-class {
  --some-var: 0.2s;
}

When the 0 is not there, :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') returns

  • for ., ['cssDefinition', 'cssAttrRegion'],
  • for 2, ['cssDefinition', 'cssAttrRegion', 'cssValueTime'],
  • for s, ['cssDefinition', 'cssAttrRegion', 'cssValueTime', 'cssUnitDecorators']

whereas if th 0 is there it returns

  • for 0, ['cssDefinition', 'cssAttrRegion', 'cssValueTime'],
  • for ., ['cssDefinition', 'cssAttrRegion', 'cssValueTime'],
  • for 2, ['cssDefinition', 'cssAttrRegion', 'cssValueTime'],
  • for s, ['cssDefinition', 'cssAttrRegion', 'cssValueTime', 'cssUnitDecorators']

I expect the syntax coloring of . to be not dependent on whether there's a leading digit in front of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions