Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Flow JavaScript – CSS grammar not injected for custom styled-components #647

Open
@edahlseng

Description

@edahlseng

Prerequisites

Description

Note: This issues applies only to the Flow JavaScript source type. As far as I can tell that's provided by this package, but if not then I can redirect this issue elsewhere.

The CSS grammar is not properly injected for styled-components using custom components. This appears to be a regression from the tree-sitter update.

Steps to Reproduce

The following correctly syntax highlights:

const TestComponent = styled.div`
	h1 {
		color: green;
	}
`;

The following does not correctly syntax highlight:

const TestComponent = styled(UnstyledComponent)`
	h1 {
		color: green;
	}
`;

Versions

$ atom --version
Atom    : 1.37.0
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3

$ apm --version
apm  2.1.7
npm  6.2.0
node 8.9.3 x64
atom 1.37.0
python 2.7.16
git 2.21.0

Additional Information

This issue is closely related to #634, which reproduced the same error in the context of a vanilla JavaScript file. (That issue was resolved with PR #639.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions