diff --git a/vim/bundle/jsx/README.md b/vim/bundle/jsx/README.md index 82ec053..69020f9 100644 --- a/vim/bundle/jsx/README.md +++ b/vim/bundle/jsx/README.md @@ -16,12 +16,16 @@ Usage By default, JSX syntax highlighting and indenting will be enabled only for files with the `.jsx` extension. If you would like JSX in `.js` files, add - let g:jsx_ext_required = 0 +```viml +let g:jsx_ext_required = 0 +``` to your .vimrc or somewhere in your include path. If you wish to restrict JSX to files with the pre-v0.12 `@jsx React.DOM` pragma, add - let g:jsx_pragma_required = 1 +```viml +let g:jsx_pragma_required = 1 +``` to your .vimrc or somewhere in your include path. diff --git a/vim/bundle/jsx/after/syntax/jsx.vim b/vim/bundle/jsx/after/syntax/jsx.vim index 63a1248..ec72dd4 100644 --- a/vim/bundle/jsx/after/syntax/jsx.vim +++ b/vim/bundle/jsx/after/syntax/jsx.vim @@ -41,3 +41,7 @@ syn region xmlString contained start=+{+ end=++ contains=jsBlock,javascriptBlock " Add jsxRegion to the lowest-level JS syntax cluster. syn cluster jsExpression add=jsxRegion + +" Allow jsxRegion to contain reserved words. +" See: https://github.com/othree/yajs.vim +syn cluster javascriptNoReserved add=jsxRegion