diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 980b3bdc..29b7f346 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -67,6 +67,7 @@ | org | ✓ | | | | | perl | ✓ | ✓ | ✓ | | | php | ✓ | ✓ | ✓ | `intelephense` | +| prisma | ✓ | | | `prisma-language-server` | | prolog | | | | `swipl` | | protobuf | ✓ | | ✓ | | | python | ✓ | ✓ | ✓ | `pylsp` | diff --git a/languages.toml b/languages.toml index 2961778f..374865f1 100644 --- a/languages.toml +++ b/languages.toml @@ -1449,3 +1449,17 @@ indent = { tab-width = 2, unit = "\t" } [[grammar]] name = "openscad" source = { git = "https://github.com/bollian/tree-sitter-openscad", rev = "5c3ce93df0ac1da7197cf6ae125aade26d6b8972" } + +[[language]] +name = "prisma" +scope = "source.prisma" +injection-regex = "prisma" +file-types = ["prisma"] +roots = ["package.json"] +comment-token = "//" +language-server = { command = "prisma-language-server", args = ["--stdio"] } +indent = { tab-width = 2, unit = " " } + +[[grammar]] +name = "prisma" +source = { git = "https://github.com/victorhqc/tree-sitter-prisma", rev = "17a59236ac25413b81b1613ea6ba5d8d52d7cd6c" } diff --git a/runtime/queries/prisma/highlights.scm b/runtime/queries/prisma/highlights.scm new file mode 100644 index 00000000..b5c0c4ae --- /dev/null +++ b/runtime/queries/prisma/highlights.scm @@ -0,0 +1,56 @@ +(string) @string + +(enumeral) @constant +(number) @constant.numeric + +(variable) @variable +(column_type) @type + +(arguments) @variable.other.member +(model_declaration (identifier) @type) + +[ + "datasource" + "enum" + "generator" + "model" + "type" +] @keyword + +[ + (comment) + (developer_comment) +] @comment + +[ + (attribute) + (block_attribute_declaration) + (call_expression) +] @function.builtin + +[ + (true) + (false) + (null) +] @constant.builtin.boolean + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +[ + ":" + "," +] @punctuation.delimiter + +[ + "=" + "@" + "@@" + (binary_expression) +] @operator \ No newline at end of file