It adds styledEmmetAbbreviation syntax to styledDefinition region which is defined in this syntax plugin.
Then, defines the syntax as styled type which extends css.
Since CSS in JS does not require { region } to write properties, it adds type !=# 'styled' condition to emmet#lang#css#parseIntoTree function, as sass type does.
Although it requires https://github.com/styled-components/vim-styled-components to work, it should not harm environments where the plugin is not installed, because syntax match styledEmmetAbbreviation "[a-z0-9#+!%]\+" containedin=styledDefinition contained does nothing if styledDefinition is not defined.
Related issue: https://github.com/mattn/emmet-vim/issues/427
It adds
styledEmmetAbbreviation
syntax tostyledDefinition
region which is defined in this syntax plugin. Then, defines the syntax asstyled
type which extendscss
. Since CSS in JS does not require{
region}
to write properties, it addstype !=# 'styled'
condition toemmet#lang#css#parseIntoTree
function, assass
type does.Although it requires https://github.com/styled-components/vim-styled-components to work, it should not harm environments where the plugin is not installed, because
syntax match styledEmmetAbbreviation "[a-z0-9#+!%]\+" containedin=styledDefinition contained
does nothing ifstyledDefinition
is not defined.Thank you!