Skip to content

Commit

Permalink
feat(syntax): add multi-line comments support (#1806)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomyno authored Dec 16, 2024
1 parent 1cf9c3d commit 35b9d51
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vscode/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
17 changes: 17 additions & 0 deletions packages/vscode/syntaxes/prisma.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{
"include": "#double_comment"
},
{
"include": "#multi_line_comment"
},
{
"include": "#model_block_definition"
},
Expand Down Expand Up @@ -47,6 +50,9 @@
{
"include": "#double_comment"
},
{
"include": "#multi_line_comment"
},
{
"include": "#field_definition"
}
Expand Down Expand Up @@ -79,6 +85,9 @@
{
"include": "#double_comment"
},
{
"include": "#multi_line_comment"
},
{
"include": "#enum_value_definition"
}
Expand Down Expand Up @@ -111,6 +120,9 @@
{
"include": "#double_comment"
},
{
"include": "#multi_line_comment"
},
{
"include": "#assignment"
}
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 35b9d51

Please sign in to comment.