diff --git a/resources/editor_plugins/kakoune/c3.kak b/resources/editor_plugins/kakoune/c3.kak new file mode 100644 index 000000000..0fdd22686 --- /dev/null +++ b/resources/editor_plugins/kakoune/c3.kak @@ -0,0 +1,26 @@ +hook global BufCreate .*[.]c3 %{ + set-option buffer filetype c3 +} + +addhl shared/c3 regions +addhl shared/c3/code default-region group +addhl shared/c3/comment-line region '//' '$' fill comment +addhl shared/c3/comment-block region /\* \*/ fill comment +addhl shared/c3/double-string region 'c?"' (?|<|=|\+|-|\*|/|%|&|^|\||!|:|\?|;|,|@)=?' 0:default +addhl shared/c3/code/num regex '\b[0-9]+(.[0-9]+)=([eE][+-]?[0-9]+)=' 0:value + +hook -group c3-highlight global WinSetOption filetype=c3 %{ add-highlighter window/ ref c3 } +hook -group c3-highlight global WinSetOption filetype=(?!c3).* %{ remove-highlighter window/c3 }