From 67a8e8ca3c342e49a4f43353a55c11caf81e0848 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 14 Oct 2016 19:16:45 +0300 Subject: [PATCH] Remove all references to `formatcmd` Initializing the `formatcmd` variable in the default language support scripts created a dependency to the `formatter.kak` script, which we do not want. Examples of such cases are when users haven't loaded the `formatter.kak` script, or when Kakoune runs its test suite and selectively loads some language scripts for testing purposes. --- rc/base/d.kak | 1 - rc/base/go.kak | 2 -- rc/base/perl.kak | 1 - rc/base/ruby.kak | 5 ----- rc/core/c-family.kak | 2 -- rc/core/python.kak | 2 -- 6 files changed, 13 deletions(-) diff --git a/rc/base/d.kak b/rc/base/d.kak index a080a7761..8822d9a60 100644 --- a/rc/base/d.kak +++ b/rc/base/d.kak @@ -111,7 +111,6 @@ hook global WinSetOption filetype=d %{ hook window InsertChar \{ -group d-indent _d-indent-on-opening-curly-brace hook window InsertChar \} -group d-indent _d-indent-on-closing-curly-brace - set window formatcmd "dfmt" set window comment_selection_chars "/+:+/" } diff --git a/rc/base/go.kak b/rc/base/go.kak index bbb830927..c4b207917 100644 --- a/rc/base/go.kak +++ b/rc/base/go.kak @@ -92,8 +92,6 @@ hook global WinSetOption filetype=go %{ hook window InsertChar \n -group go-indent _go-indent-on-new-line hook window InsertChar \{ -group go-indent _go-indent-on-opening-curly-brace hook window InsertChar \} -group go-indent _go-indent-on-closing-curly-brace - - set window formatcmd "gofmt" } hook -group go-highlight global WinSetOption filetype=(?!go).* %{ rmhl go } diff --git a/rc/base/perl.kak b/rc/base/perl.kak index 086ec4e4e..2c7b00090 100644 --- a/rc/base/perl.kak +++ b/rc/base/perl.kak @@ -118,7 +118,6 @@ hook global WinSetOption filetype=perl %{ hook window InsertChar \{ -group perl-indent _perl-indent-on-opening-curly-brace hook window InsertChar \} -group perl-indent _perl-indent-on-closing-curly-brace - set window formatcmd "perltidy" set window comment_selection_chars "" set window comment_line_chars "#" } diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index a4e8b1818..829841975 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -161,11 +161,6 @@ 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 -group ruby-highlight global WinSetOption filetype=(?!ruby).* %{ rmhl ruby } diff --git a/rc/core/c-family.kak b/rc/core/c-family.kak index 293c7335e..e8c81613b 100644 --- a/rc/core/c-family.kak +++ b/rc/core/c-family.kak @@ -240,8 +240,6 @@ hook global WinSetOption filetype=(c|cpp|objc) %[ hook -group c-family-insert window InsertChar \n _c-family-insert-on-newline alias window alt c-family-alternative-file - - set window formatcmd "astyle" ] hook global WinSetOption filetype=(?!(c|cpp|objc)$).* %[ diff --git a/rc/core/python.kak b/rc/core/python.kak index 69da651a7..42d9d449f 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -75,8 +75,6 @@ hook global WinSetOption filetype=python %{ hook window InsertChar \n -group python-indent _python_indent_on_new_line # cleanup trailing whitespaces on current line insert end hook window InsertEnd .* -group python-indent %{ try %{ exec -draft \; s ^\h+$ d } } - - set window formatcmd "autopep8 -" } hook -group python-highlight global WinSetOption filetype=(?!python).* %{ rmhl python }