mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.
1.59k stars 95 forks source link

Color components and elements differently #135

Open TrySound opened 7 years ago

TrySound commented 7 years ago

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.

mxw commented 7 years ago

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

TrySound commented 7 years ago

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.

hdon commented 7 years ago

I don't mind them having the same color.