Open gronka opened 4 years ago
Sorry my comment is a little bit of a non-sequitur, but I have been having weird issues with tsx highlighting lately. Will try to summarize:
On Ubuntu 18.04:
neovim 0.4.4 stable: These plugins don't work. I get massive swathes of missing highlighting and incorrect highlighting. Without any of these plugins, I get absolutely zero syntax highlighting in tsx files. neovim v0.5.0-828-g0a95549d6: No plugins needed for decent tsx highlighting vim 8.2 patches 1-2071: No plugins needed for decent tsx highlighting
Conclusion: I am not using any jsx/tsx highlighting vim plugins anymore, and hoping that neovim nightly improves in stability. Trying to work out the correct set of plugins to use with neovim 0.4.4 seems pointless if I can just run vim instead. I tend to bounce back and forth between vim and neovim in the course of testing various capabilities.
Sorry, this will be a bit crude
From vimrc:
Typescript blocks of code do not highlight, and newline indentations have an error. If I start a new line after a component block is closed with '>', it will be given 0 indentation and a closing bracket '>'. The filetype is correctly set to
typescript.tsx
.I'm using function components in the spirit of react hooks (my example should be the same as pure components I believe).
This issues were observed in this simple file. The bracket error occurs when I create a new line at the closing '>' for Sidebar.
Workaround: I'm using these packages in vimrc and highlighting works as expected (albeit a bit slower as some users have noted):