From 35b9d51ff237728c6c66a3fba0a65a3b893213e0 Mon Sep 17 00:00:00 2001 From: Alberto Schiabel Date: Mon, 16 Dec 2024 12:08:28 +0100 Subject: [PATCH] feat(syntax): add multi-line comments support (#1806) --- packages/vscode/language-configuration.json | 6 +++++- packages/vscode/syntaxes/prisma.tmLanguage.json | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/vscode/language-configuration.json b/packages/vscode/language-configuration.json index 5b67cbb616..b20d6478e0 100644 --- a/packages/vscode/language-configuration.json +++ b/packages/vscode/language-configuration.json @@ -2,7 +2,11 @@ // https://code.visualstudio.com/api/language-extensions/language-configuration-guide "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": [ diff --git a/packages/vscode/syntaxes/prisma.tmLanguage.json b/packages/vscode/syntaxes/prisma.tmLanguage.json index 6cc5e80d4e..db8a85ffc4 100644 --- a/packages/vscode/syntaxes/prisma.tmLanguage.json +++ b/packages/vscode/syntaxes/prisma.tmLanguage.json @@ -12,6 +12,9 @@ { "include": "#double_comment" }, + { + "include": "#multi_line_comment" + }, { "include": "#model_block_definition" }, @@ -47,6 +50,9 @@ { "include": "#double_comment" }, + { + "include": "#multi_line_comment" + }, { "include": "#field_definition" } @@ -79,6 +85,9 @@ { "include": "#double_comment" }, + { + "include": "#multi_line_comment" + }, { "include": "#enum_value_definition" } @@ -111,6 +120,9 @@ { "include": "#double_comment" }, + { + "include": "#multi_line_comment" + }, { "include": "#assignment" } @@ -379,6 +391,11 @@ "end": "$\\n?", "name": "comment.prisma" }, + "multi_line_comment": { + "begin": "/*", + "end": "*/", + "name": "comment.prisma" + }, "double_comment_inline": { "match": "//[^\\n]*", "name": "comment.prisma"