othree / es.next.syntax.vim

ES.Next syntax for Vim
MIT License
125 stars 7 forks source link

yajs + es.next.syntax.vim + vim-jsx indent now working #5

Closed minhyeong-kim closed 6 years ago

minhyeong-kim commented 8 years ago

yajs + es.next.syntax.vim

jsx-indent2

work fine. but

yajs + es.next.syntax.vim + vim-jsx

jsx-indent

break indent when enter pressed.

othree commented 8 years ago

How about vim-jsx only

minhyeong-kim commented 8 years ago

it seems work only jsx syntax.

jsx-indent-jsx-only

minhyeong-kim commented 8 years ago

i commented all plugin except those plugin. but it has same problems.

othree commented 8 years ago

Try add this https://github.com/othree/xml.vim

minhyeong-kim commented 8 years ago

i added 4 plugins

Plug 'othree/yajs'
Plug 'othree/xml.vim'
Plug 'othree/es.next.syntax.vim'
Plug 'mxw/vim-jsx'

but it has problem also. you mean load 'othree/xml.vim' without 'mxw/vim-jsx'?

othree commented 8 years ago

How about yajs + vim-jsx only?

othree commented 8 years ago

BTW, I enable every vim-scripts and works fine. So I will need your help to find out the root cause~

johnny-mh commented 8 years ago

yajs + vim-jsx: has problem also. indent applied only JSX syntax.

johnny-mh commented 8 years ago

i also added vim-jsx setting let g:jsx_ext_required = 0. is this cause problem?


i think this option is not problem.

minhyeong-kim commented 8 years ago

gavocanov/vim-js-indent plugin makes JS, JSX indent work.

I think the problem is absence of GetJavascriptIndent() function. gavocanov/vim-js-indent plugin just indent part of pangloss/vim-javascript plugin. so it has function too.

Right now. it seems to be work fine with vim-js-indent. but i hope yajs plugin to be support jsx indent without other plugins.

othree commented 8 years ago

Actually indent system and syntax highlight system are independent. They both have their own rule to deal with their stuff.

MaxMEllon commented 8 years ago

I created jsx syntax highlight plugin for yajs.vim and es.next.syntax.vim.

https://github.com/MaxMEllon/vim-jsx-pretty

Please use it if you would like to.