From c1f67972e47a5235e9eed5f5ca9dae8c163e3af4 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Wed, 14 Oct 2020 07:55:06 -0400 Subject: [PATCH] rc nix: handle dashes embedded in identifiers Some experimentation at the REPL showed that any number of leading dashes are operators, while embedded dashes are identifier characters. Closes #3803. --- rc/filetype/nix.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/nix.kak b/rc/filetype/nix.kak index 36137552..f086be20 100644 --- a/rc/filetype/nix.kak +++ b/rc/filetype/nix.kak @@ -63,7 +63,7 @@ add-highlighter shared/nix/code/ regex \b(rec)\b\s*\{ 1:keyword add-highlighter shared/nix/code/ regex '[^.]\s*\b(builtins|inherit|baseNameOf|derivation|dirOf|fetchTarball|import|isNull|map|removeAttrs|throw|toString)\b\s*[^=]' 1:builtin add-highlighter shared/nix/code/ regex '\b\s*(\.)\s*\b' 1:operator -add-highlighter shared/nix/code/ regex '-' 0:operator +add-highlighter shared/nix/code/ regex '[^-a-zA-Z0-9_](-+)' 1:operator add-highlighter shared/nix/code/ regex '\?' 0:operator add-highlighter shared/nix/code/ regex '\+\+=?' 0:operator add-highlighter shared/nix/code/ regex '(\*|/|\+)' 0:operator