mxw / vim-jsx

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

Add `javascript` prefixed groups from javascript syntax #37

Closed othree closed 9 years ago

othree commented 9 years ago

It will be great if general group name for JavaScript syntax can add to vim-jsx. Based on the doc, The group name should be filetype prefixed. And all in lowercase. Ref

mxw commented 9 years ago

@othree—What JavaScript syntax files are you using? As the README states, vim-jsx depends on pangloss/vim-javascript, which does not include any syntax entities called "javascriptBlock" or "javascriptString".

othree commented 9 years ago

I maintain another JavaScript syntax myself, called yajs.vim. I follow Vim doc's suggestion and use javascript as group name prefix. There is another JavaScript syntax group name very common: javaScript. Its because the syntax file for JavaScript provided by Vim use it. But its not follow the convention.

I know this plugin's dependency is pangloss/vim-javascript. But If you can support these two group name format. Lots of JavaScript syntax can just work with vim-jsx. ex: default syntax, yajs, jelera/vim-javascript-syntax (upstream of yajs).

lazywei commented 9 years ago

would love to have this be merged into master given i'm also using yajs like @othree Thanks! :beers:

mxw commented 9 years ago

Okay sure, this seems pretty reasonable. Can you git pull --rebase over the most recent changes? The syntax/javascript.vim file has been renamed to syntax/jsx.vim.

othree commented 9 years ago

Since I am not sure how to rebase on a PR. I will resend another PR for the change.