kakoune/rc/base/ini.kak

15 lines
567 B
Plaintext
Raw Normal View History

hook global BufCreate .*\.(repo|service|target|socket|ini|cfg) %{
set buffer filetype ini
}
2017-01-04 01:07:45 +01:00
add-highlighter -group / regions -default code ini \
comment '(^|\h)\K[#;]' $ ''
2017-01-04 01:07:45 +01:00
add-highlighter -group /ini/code regex "^\h*\[[^\]]*\]" 0:title
add-highlighter -group /ini/code regex "^\h*([^\[][^=\n]*=)([^\n]*)" 1:variable 2:value
2017-01-04 01:07:45 +01:00
add-highlighter -group /ini/comment fill comment
2017-01-04 01:07:45 +01:00
hook -group ini-highlight global WinSetOption filetype=ini %{ add-highlighter ref ini }
hook -group ini-highlight global WinSetOption filetype=(?!ini).* %{ remove-highlighter ini }