configs/dot.config/kak/autoload/stuff.kak

33 lines
1.1 KiB
Text
Raw Normal View History

2017-11-20 13:53:56 +01:00
# hooks to show line numbers, whitespaces and matching brackets
hook -group DefaultHighlights global WinCreate .* %{
2019-09-03 17:47:15 +02:00
add-highlighter window/ show-whitespaces
add-highlighter window/ show-matching
add-highlighter window/ regex '\h+$' 0:default,red # highlight trailing whitepaces
2018-07-19 21:54:06 +02:00
add-highlighter window/ dynregex '%reg{/}' 0:+u 1:+b
set-face window Whitespace rgb:555555+b
}
hook -group markdown-highlight global WinSetOption filetype=markdown %{
add-highlighter window/ wrap -word -width 80
2019-09-03 17:47:15 +02:00
add-highlighter window/ number-lines -hlcursor -separator ' '
2017-11-20 13:53:56 +01:00
}
2018-07-19 21:54:06 +02:00
hook global WinSetOption filetype=(?!markdown).* %{
2019-09-03 17:47:15 +02:00
add-highlighter window/ number-lines -hlcursor -separator ' '
2017-11-20 13:53:56 +01:00
}
hook global WinSetOption filetype=(javascript|ecmascript) %{
set window formatcmd 'prettier-standard'
#hook window BufWritePre .* format
}
hook global WinSetOption filetype=rust %{
racer-enable-autocomplete
set window formatcmd 'rustfmt'
hook window BufWritePre .* format
set buffer tabstop 4
set buffer indentwidth 4
}
hook global WinSetOption filetype=json %{
set window formatcmd 'jq .'
hook window BufWritePre .* format
}