From 6a3421d285f3da684a341089e28ef9575c151511 Mon Sep 17 00:00:00 2001 From: Alex Chapman Date: Wed, 30 Oct 2019 10:22:31 +1100 Subject: [PATCH] Add support for quoted labels, empty record values and their type --- rc/filetype/dhall.kak | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rc/filetype/dhall.kak b/rc/filetype/dhall.kak index 2876d383..631d9121 100644 --- a/rc/filetype/dhall.kak +++ b/rc/filetype/dhall.kak @@ -40,14 +40,17 @@ add-highlighter shared/dhall/line_comment region -- $ fill comment # Matches multi-line string literals add-highlighter shared/dhall/multiline_string region \Q''\E$ [^']''[^'] fill string +# Matches quoted labels +add-highlighter shared/dhall/quoted_label region ` ` fill normal + # Matches built-in types -add-highlighter shared/dhall/code/ regex \b(Location|Sort|Kind|Type|Text|Bool|Natural|Integer|Double|List|Optional)\b 0:type +add-highlighter shared/dhall/code/ regex \b(Location|Sort|Kind|Type|Text|Bool|Natural|Integer|Double|List|Optional|\{\})\b 0:type # Matches built-in keywords add-highlighter shared/dhall/code/ regex \b(if|then|else|let|in|using|missing|as|merge|toMap)\b 0:keyword # Matches bulit-in values -add-highlighter shared/dhall/code/ regex \b(True|False|Some|None|-?Infinity||NaN)\b 0:value +add-highlighter shared/dhall/code/ regex \b(True|False|Some|None|-?Infinity|\{=\}|NaN)\b 0:value # Matches built-in operators add-highlighter shared/dhall/code/ regex (,|:|\|\||&&|==|!=|=|\+|\*|\+\+|#|⩓|//\\\\|→|->|\?|λ|\\|\^|⫽|//|\[|\]|\{|\}) 0:operator