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.
This commit is contained in:
parent
41a497d4fc
commit
67a8e8ca3c
|
@ -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 "/+:+/"
|
||||
}
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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 "#"
|
||||
}
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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)$).* %[
|
||||
|
|
|
@ -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 \; <a-x> s ^\h+$ <ret> d } }
|
||||
|
||||
set window formatcmd "autopep8 -"
|
||||
}
|
||||
|
||||
hook -group python-highlight global WinSetOption filetype=(?!python).* %{ rmhl python }
|
||||
|
|
Loading…
Reference in New Issue
Block a user