mxw / vim-jsx

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

My jsx isn't highlighted #184

Open CristoAMH opened 5 years ago

CristoAMH commented 5 years ago

I don't know why the plugin doesn't work. I add the line let g:jsx_ext_required = 0 and it didn't work.

If I put :set syntax=javascript.jsx it works, but I want to work without use this every time.


Os version: Mojave Vim version: 8.0

captura de pantalla 2018-12-19 a las 9 26 43

lukerollans commented 5 years ago

@CristoAMH You can add something like this to your vimrc

" Use JSX syntax highlighting in TSX files
autocmd BufRead,BufNewFile *.tsx setlocal syntax=javascript.jsx
adrianhelvik commented 5 years ago

Maybe all JavaScript files should be highlighted by default? Not a major issue for me, but it's a very sensible default.