From 7eec09d67d73994012eb23b6da640a4618bc20d4 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Mon, 20 Dec 2021 10:23:52 -0500 Subject: [PATCH] Add highlighting for CODEOWNERS --- rc/filetype/github.kak | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rc/filetype/github.kak diff --git a/rc/filetype/github.kak b/rc/filetype/github.kak new file mode 100644 index 00000000..17e593a2 --- /dev/null +++ b/rc/filetype/github.kak @@ -0,0 +1,18 @@ +hook global BufCreate .*/CODEOWNERS %{ + set-option buffer filetype codeowners +} + +hook global WinSetOption filetype=codeowners %{ + require-module codeowners +} + +hook -group codeowners-hightlight global WinSetOption filetype=codeowners %{ + add-highlighter window/codeowners ref codeowners + hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/codeowners } +} + +provide-module codeowners %{ +add-highlighter shared/codeowners regions +add-highlighter shared/codeowners/comments region ^# $ group +add-highlighter shared/codeowners/comments/ fill comment +}