mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Color components and elements differently

TrySound opened this issue · comments

vscode introduced this feature
https://twitter.com/mattbierner/status/861630591124381696
Would be good to see it in this project
The difference is upper and lower case of first letter.

Don't components and tags both have conceptually the same role? Moreover—are components actually required to be uppercase?

Yep. Lowercase is builtin primitive like tags, which are passed as strings to createElement (in context of react). Uppercase is custom component passed as class or function. The use case is to differ builtin primitives and user components.

I don't mind them having the same color.