From e0731b70cf04adb728bb6bb7848d2c67aef24860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hampus=20Fr=C3=B6jdholm?= Date: Tue, 25 May 2021 00:46:54 +0200 Subject: [PATCH] Improve highlighting of markdown lists Removes the inline code highlighter for lists to improve readability in indented lists. --- rc/filetype/markdown.kak | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rc/filetype/markdown.kak b/rc/filetype/markdown.kak index f0337ffcc..cdb17a71e 100644 --- a/rc/filetype/markdown.kak +++ b/rc/filetype/markdown.kak @@ -55,12 +55,13 @@ evaluate-commands %sh{ done } -add-highlighter shared/markdown/codeblock region -match-capture \ +add-highlighter shared/markdown/inline/codeblock region -match-capture \ ^(\h*)```\h* \ ^(\h*)```\h*$ \ fill meta +add-highlighter shared/markdown/codeblock region "^( {4}|\t)" "$" fill meta -add-highlighter shared/markdown/listblock region ^\h*[-*]\s ^\h*((?=[-*])|$) regions +add-highlighter shared/markdown/listblock region ^\h*[-*]\s ^(?=\S) regions add-highlighter shared/markdown/listblock/g default-region group add-highlighter shared/markdown/listblock/g/ ref markdown/inline add-highlighter shared/markdown/listblock/g/marker regex ^\h*([-*])\s 1:bullet @@ -91,9 +92,6 @@ add-highlighter shared/markdown/inline/text/ regex (?\h*)+ 0:comment add-highlighter shared/markdown/inline/text/ regex "\H( {2,})$" 1:+r@meta -# Inline code -add-highlighter shared/markdown/inline/text/ regex "^( {4}|\t)+([^\n]+)" 2:meta - # Commands # ‾‾‾‾‾‾‾‾