Skip to content

import...as interpreted as cast #154

@nathanmsmith

Description

@nathanmsmith

I've come across an issue where the * as X part of a import * as X from 'x' line seems to be interpreted as a cast instead of an import by the regexes. This results in some slightly off highlighting:

Screen Shot 2019-12-22 at 4 12 23 PM

The issues:

  • the as is highlighted as typescriptCastKeyword
  • the module (React, in this example) is highlighted as typescriptTypeReference

Here's how I would expect it to be highlighted: (I achieved this by changing my syntax to JavaScript)
Screen Shot 2019-12-22 at 4 15 19 PM

I'm pretty new to the world of vim syntax highlighting, but I'd guess the fix would be some regex wrangling. I'm happy to take a stab at it but figured I'd file this issue first to see if this is indeed a bug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nathanmsmith

        Issue actions

          import...as interpreted as cast · Issue #154 · HerringtonDarkholme/yats.vim