From f839274e7ef9637e6efbc3c3c1b870d415d24508 Mon Sep 17 00:00:00 2001 From: "Jan T. Sott" Date: Sun, 2 Jul 2023 21:22:38 +0200 Subject: [PATCH] add !assert command --- snippets/core.NSIS.json | 7 +++++++ syntaxes/nsis.tmLanguage | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/snippets/core.NSIS.json b/snippets/core.NSIS.json index d5332de..78f84f9 100644 --- a/snippets/core.NSIS.json +++ b/snippets/core.NSIS.json @@ -41,6 +41,13 @@ "leftLabelHTML": "!", "prefix": "appendfile" }, + "!assert": { + "body": "!assert \"${1:value}\" \"${2:message}\"$0", + "description": "Usage: !assert value [op value2] message", + "descriptionMoreURL": "https://idleberg.github.io/NSIS.docset/Contents/Resources/Documents/html/Commands/!assert.html?utm_source=atom&utm_content=snippet", + "leftLabelHTML": "!", + "prefix": "assert" + }, "!cd": { "body": "!cd \"${1:new_path}\"$0", "description": "Usage: !cd absolute_or_relative_new_directory", diff --git a/syntaxes/nsis.tmLanguage b/syntaxes/nsis.tmLanguage index 0916ddb..865ca19 100644 --- a/syntaxes/nsis.tmLanguage +++ b/syntaxes/nsis.tmLanguage @@ -40,7 +40,7 @@ match - ^\s*(?i)\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning)\b + ^\s*(?i)\!(addincludedir|addplugindir|appendfile|assert|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning)\b name keyword.other.nsis