Merge branch 'claytron-rubocop-formatter'
This commit is contained in:
commit
b92b0e3c5d
@ -191,6 +191,10 @@ Here is a list of formatprograms that are supported by default, and thus will be
|
|||||||
Here is the link to the repository: https://github.com/erniebrodeur/ruby-beautify.
|
Here is the link to the repository: https://github.com/erniebrodeur/ruby-beautify.
|
||||||
This beautifier developed and tested with ruby `2.0+`, so you can have weird results with earlier ruby versions.
|
This beautifier developed and tested with ruby `2.0+`, so you can have weird results with earlier ruby versions.
|
||||||
|
|
||||||
|
* `rubocop` for __Ruby__.
|
||||||
|
It can be installed by running `gem install rubocop`.
|
||||||
|
Here is the link to the repository: https://github.com/bbatsov/rubocop
|
||||||
|
|
||||||
* `gofmt` for __Golang__.
|
* `gofmt` for __Golang__.
|
||||||
The default golang formatting program is shipped with the golang distribution. Make sure `gofmt` is in your PATH (if golang is installed properly, it should be).
|
The default golang formatting program is shipped with the golang distribution. Make sure `gofmt` is in your PATH (if golang is installed properly, it should be).
|
||||||
Here is the link to the installation: https://golang.org/doc/install
|
Here is the link to the installation: https://golang.org/doc/install
|
||||||
|
@ -233,8 +233,14 @@ if !exists('g:formatdef_rbeautify')
|
|||||||
let g:formatdef_rbeautify = '"rbeautify ".(&expandtab ? "-s -c ".shiftwidth() : "-t")'
|
let g:formatdef_rbeautify = '"rbeautify ".(&expandtab ? "-s -c ".shiftwidth() : "-t")'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists('g:formatdef_rubocop')
|
||||||
|
" The pipe to sed is required to remove some rubocop output that could not
|
||||||
|
" be suppressed.
|
||||||
|
let g:formatdef_rubocop = "'rubocop --auto-correct -o /dev/null -s '.bufname('%').' \| sed -n 2,\\$p'"
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists('g:formatters_ruby')
|
if !exists('g:formatters_ruby')
|
||||||
let g:formatters_ruby = ['rbeautify']
|
let g:formatters_ruby = ['rbeautify', 'rubocop']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user