Closed alexseitsinger closed 4 years ago
@alexseitsinger Could you provide the code snippets and screenshots if possible?
No syntax highlight for props (with/without parameters):
Syntax highlighting is all green (using this component). (with/without parameters):
I've only recently begun to adopt TypeScript, so it is possible that I'm doing something wrong, leading to incorrect highlighting...
Thanks for your time.
After further investigation, it appears this issue may be connected to limitations of the 'HerringtonDarkholme/yats.vim' plugin.
Greetings,
It appears that syntax highlighting fails for portions of a .tsx file when a needed ReturnType is inserted into an arrow function. Also, when operating on a .tsx file, object destructuring fails to be syntax highlighted as it is with .jsx files.
I have previous tried disabling each plugin and re-enabling them individually with no success.
To me, it appears like adding the ReturnType causes VIM to interpret the proceeding code as a syntax error? I'm not too sure.
When it does get highlighted correctly, page-up or page-down on the module file will cause the code after the entered ReturnType to be highlighted in green (matching the highlight color of the ReturnType (eg:
{(): ReactElement => { most of code in here gets highlighted green }}
).Also, syntax highlighting within objects (eg:
css={{ height: "100%" }}
) doesn't work at all.Editor: Neovim v0.3.8 Colorscheme: Gruvbox FIletype: typescript.tsx Plugins (for TypeScript/JavaScript):