vim-jsx icon indicating copy to clipboard operation
vim-jsx copied to clipboard

Setting filetype to 'javascript.jsx' is not good idea

Open daliusd opened this issue 7 years ago • 4 comments

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.

daliusd avatar Dec 10 '18 18:12 daliusd

@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 avatar Jan 26 '19 14:01 yuezk

@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.

daliusd avatar Jan 27 '19 20:01 daliusd

My .js file not automatically indent when insert new line. After removing vim-jsx plugin, it works again.

seabornlee avatar Mar 06 '22 03:03 seabornlee

Lastly I have migrated to tree-sitter.

daliusd avatar Mar 06 '22 10:03 daliusd