Closed daliusd closed 2 years ago
@daliusd You can try MaxMEllon/vim-jsx-pretty, which was inspired by vim-jsx initially but it doesn't change the filetype of the js files. It makes many efforts to improve the syntax highlighting and indenting.
I admit that vim-jsx is a great plugin but it depends on the xml syntax highlighting which doesn't compatible with the jsx syntax completely. While the vim-jsx-pretty implemented the JSX syntax specification with no dependency and many corner test cases covered.
@yuezk That's what I'm actually using now. I have reported this only to help others to figure out why something has stopped working or is not working at all.
My .js file not automatically indent when insert new line. After removing vim-jsx plugin, it works again.
Lastly I have migrated to tree-sitter.
I found that that this plugin change *.js filetype to 'javascript.jsx' and that breaks tern_for_vim and autocomplete-flow plugins as they expect 'javascript' filetype to work properly. Maybe proper way would be to fix these two plugins but who knows how many more plugins are out there that expect "javascript" filetype.