diff --git a/rc/filetype/conf.kak b/rc/filetype/conf.kak index 8288a0ba6..9b715893e 100644 --- a/rc/filetype/conf.kak +++ b/rc/filetype/conf.kak @@ -2,6 +2,13 @@ hook global BufCreate .+\.(repo|cfg|properties|desktop) %{ set-option buffer filetype conf } +hook global WinCreate .+\.ini %{ + try %{ + execute-keys /^\h*# + set-option buffer filetype conf + } +} + hook global WinSetOption filetype=conf %{ require-module conf } diff --git a/rc/tools/comment.kak b/rc/tools/comment.kak index 8d3ee7989..1094fbba1 100644 --- a/rc/tools/comment.kak +++ b/rc/tools/comment.kak @@ -45,6 +45,10 @@ hook global BufSetOption filetype=coffee %{ set-option buffer comment_block_end '###' } +hook global BufSetOption filetype=conf %{ + set-option buffer comment_line '#' +} + hook global BufSetOption filetype=css %{ set-option buffer comment_line '' set-option buffer comment_block_begin '/*'