mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax (or filetype) not working properly

elquimista opened this issue · comments

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
:set syntax=javascript.jsx

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