From c94acc982d577defa8f1e8f2919c09079b5905ef Mon Sep 17 00:00:00 2001 From: Torben Ewert Date: Wed, 2 Aug 2023 16:10:40 +0200 Subject: [PATCH] add block comments highlighting --- language-configuration.json | 9 +++++---- syntaxes/pinc.tmLanguage.json | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/language-configuration.json b/language-configuration.json index 6e21f75..da57f72 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -1,17 +1,18 @@ { "comments": { - // symbol used for single line comment. Remove this entry if your language does not support line comments - "lineComment": "//" + "lineComment": "//", + "blockComment": [ + ["/*", "*/"], + ] }, - // symbols used as brackets "brackets": [ ["{|", "|}"], ["{", "}"], ["[", "]"], ["(", ")"] ], - // symbols that are auto closed when typing "autoClosingPairs": [ + ["/*", "*/"], ["{|", "|}"], ["{", "}"], ["[", "]"], diff --git a/syntaxes/pinc.tmLanguage.json b/syntaxes/pinc.tmLanguage.json index 4806f34..0fe62ce 100644 --- a/syntaxes/pinc.tmLanguage.json +++ b/syntaxes/pinc.tmLanguage.json @@ -3,6 +3,9 @@ "name": "PiNC", "scopeName": "source.pi", "patterns": [ + { + "include": "#block_comment" + }, { "include": "#double_comment" }, @@ -323,6 +326,17 @@ "begin": "//", "end": "$\\n?", "name": "comment.line.double-slash" + }, + "block_comment": { + "comment": "Block comment", + "name": "comment.block.cxm", + "begin": "/\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#block_comment" + } + ] } } } -- 2.51.2