gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
477 stars 83 forks source link

Styled components / Atom: no autocompletion, and, no highlighting on extended styles #524

Open metamn opened 5 years ago

metamn commented 5 years ago

I can't autocomplete with styled components, at all: screenshot from 2019-01-13 12-18-00

Syntax highlighting works unless the style is an extended style: screenshot from 2019-01-13 12-19-44

Source code: https://github.com/metamn/mr-ui/blob/master/src/basics/TypographyClassic/TypographyClassic.js

I have the latest (2.85.0) language-babel with Styled Components Auto-Complete checked: screenshot from 2019-01-13 12-22-56

Thank you, no rush :)

tedjames commented 5 years ago

Also having an issue with this. Can someone look further into this? Much appreciated!

royipressburger commented 5 years ago

regarding the syntax highlight, it looks like every prefix which is not styled well cause the css not be highlighted. for example:

import styled from 'styled-components`;

const style  = styled.div`
    // here all styles will be highlighted
`

//But if we change the import:
import style from 'styled-components';

const styled  = style.div`
    // no highlight in here
`

this is of course will be issue with createGlobalStyle

BryantIT commented 3 years ago

I also have this issue.