From c7043e06ee98758253d9aacdd25a05a92934af46 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 14 May 2020 10:24:24 +0300 Subject: [PATCH] rc ini: More leniently highlight section names Highlight every character between brackets, including more brackets. This allows alternative constructs in INI files such as: ``` [section] [[subsection]] ``` This commit also only applies the appropriate face on the section name itself, not the entire line (including hypothetical surrounding whitespace characters). --- rc/filetype/ini.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/ini.kak b/rc/filetype/ini.kak index 6d5d1b9d0..1e922fdd1 100644 --- a/rc/filetype/ini.kak +++ b/rc/filetype/ini.kak @@ -18,7 +18,7 @@ add-highlighter shared/ini regions add-highlighter shared/ini/code default-region group add-highlighter shared/ini/comment region '(^|\h)\K[#;]' $ fill comment -add-highlighter shared/ini/code/ regex "^\h*\[[^\]]*\]" 0:title +add-highlighter shared/ini/code/ regex "(?S)^\h*(\[.+?\])\h*$" 1:title add-highlighter shared/ini/code/ regex "^\h*([^\[][^=\n]*)=([^\n]*)" 1:variable 2:value }