MaxMEllon / vim-jsx-pretty

:flashlight: [Vim script] JSX and TSX syntax pretty highlighting for vim.
MIT License
966 stars 39 forks source link

Wrong indent after paren #1

Closed Eiryyy closed 8 years ago

Eiryyy commented 8 years ago

I typed return (<CR>, but I think it's wrong indentation.

2016-07-15 15 30 24

I use these plugins (only loaded).

- webapi-vim: OK
- vim-jsx-pretty: OK
- lightline.vim: OK
- vim-slime: OK
- molokai: OK
- yajs: OK
- neocomplete.vim: OK
- neosnippet: OK
- vim-over: OK
- vimproc: OK
- vim-fugitive: OK
- javascript-libraries-syntax.vim: OK
- emmet-vim: OK
- vim-surround: OK
- syntastic: OK
- vimshell: OK
- vim-nodejs-complete: OK
- neosnippet-snippets: OK
- unite.vim: OK
- tagbar: OK
- es.next.syntax.vim: OK
- open-browser.vim: OK
- VimClojure: OK
- ag.vim: OK
MaxMEllon commented 8 years ago

Thank you reporting. I am japanese, so You may use japanese (if you are japanese).

Sorry for my poor english. so in japanese.

本プラグインはインデントの設定を含めていません. なので,別途インデントの設定ファイルをvim のランタイムに含めることで期待したインデンテーションが可能になると思います.

次のコマンドを実行すれば,期待した動作になると思います.

$ mkdir -p ~/.vim/after/indent
$ cd ~/.vim/after/indent
$ wget https://gist.github.com/MaxMEllon/4f6e255cbf8c649a9750463b4e9fe414

This plugin have not indent settings. so you need to download indent settings of javascript.

The following command

$ mkdir -p ~/.vim/after/indent
$ cd ~/.vim/after/indent
$ wget https://gist.github.com/MaxMEllon/4f6e255cbf8c649a9750463b4e9fe414
Eiryyy commented 8 years ago

ありがとうございます。今後プラグインにインデント設定を含める予定はありますか?

MaxMEllon commented 8 years ago

。今後プラグインにインデント設定を含める予定はありますか?

あります。が、しかしユーザーによって、FileType javascriptのときにセットされている indentexpr が異なってしまっているので、そこをどううまく吸収するかを悩んでおります。

解決案としては、

が今のところ上がっております。

MaxMEllon commented 8 years ago

インデントの設定を実装しました d6d1eae