From 326421c8106d7aae4f4851dabfed9bba4928f696 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 10 Mar 2016 15:07:08 +0200 Subject: [PATCH] Add `rubocop` as default ruby formatter --- rc/base/ruby.kak | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index 2e9cd15b..1454b8b8 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -109,6 +109,11 @@ hook global WinSetOption filetype=ruby %{ set window comment_line_chars '#' set window comment_selection_chars '^begin=:^=end' + + # Rubocop requires a filepath that will be used when generating the errors summary, + # even though it's reading anonymous data on stdin + # It also leaves an ugly separator on the first line on the output + set window formatcmd 'rubocop --auto-correct --stdin - -o /dev/null | sed 1d' } hook global WinSetOption filetype=(?!ruby).* %{