mxw / vim-jsx

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

Syntax (or filetype) not working properly #181

Closed elquimista closed 6 years ago

elquimista commented 6 years ago

What is the correct syntax/filetype for this plugin to work - javascript or jsx?

Button.js (:set filetype=javascript)

screen shot 2018-10-23 at 8 47 11 pm

☝️Syntax highlighting is correct for regular JS code, but insufficient highlighting for JSX part.

Button.js (:set filetype=jsx)

screen shot 2018-10-23 at 8 47 50 pm

☝️Syntax highlighting seems to be correct for JSX code, but no highlighting for regular JS code.

I'm using Vim 8.1 with following line at the top of my ~/.vim/vimrc file to load the plugin:

set runtimepath^=~/.vim/plugins/vim-jsx
evmorov commented 6 years ago
:set syntax=javascript.jsx
elquimista commented 6 years ago

Woah, it's simple as that.. wonder why I didn't see it in the README (or any other documentation). I'm closing this...