prisma: Update grammar and syntax highlighting (#23596)
Victor Quiroz
and
Marshall Bowers
created
- Updates the bindings
([tree-sitter-prisma](https://github.com/victorhqc/tree-sitter-prisma))
to its latest update (recently updated to use latest tree-sitter)
- Improves syntax highlighting
- Adds the `view` keyword
**After**
<img width="1174" alt="Screenshot 2025-01-24 at 12 44 57"
src="https://github.com/user-attachments/assets/84e6afe0-5340-4cdf-ad85-9a800a757323"
/>
**Before**
<img width="1174" alt="Screenshot 2025-01-24 at 12 44 45"
src="https://github.com/user-attachments/assets/11296998-fdfe-4fe8-8e5b-feeb41c24385"
/>
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Change summary
extensions/prisma/extension.toml | 4 +-
extensions/prisma/languages/prisma/highlights.scm | 19 +++++++++++++---
2 files changed, 17 insertions(+), 6 deletions(-)
Detailed changes
@@ -3,7 +3,7 @@ name = "Prisma"
description = "Prisma support."
version = "0.0.4"
schema_version = 1
-authors = ["Matthew Gramigna <matthewgramigna@gmail.com>"]
+authors = ["Matthew Gramigna <matthewgramigna@gmail.com>", "Victor Quiroz <git@victorhqc.com>"]
repository = "https://github.com/zed-industries/zed"
[language_servers.prisma-language-server]
@@ -12,4 +12,4 @@ language = "Prisma"
[grammars.prisma]
repository = "https://github.com/victorhqc/tree-sitter-prisma"
-commit = "eca2596a355b1a9952b4f80f8f9caed300a272b5"
+commit = "beeac50812da9765e29cbb2af1324783033cdca3"
@@ -3,18 +3,28 @@
"enum"
"generator"
"model"
+ "view"
] @keyword
(comment) @comment
(developer_comment) @comment
+(number) @number
+(string) @string
+(false) @boolean
+(true) @boolean
(arguments) @property
-(attribute) @function
-(call_expression) @function
-(column_type) @type
+(maybe) @punctuation
+(call_expression (identifier) @function)
(enumeral) @constant
(identifier) @variable
-(string) @string
+(column_declaration (identifier) (column_type (identifier) @type))
+(attribute (identifier) @label)
+(attribute (call_expression (identifier) @label))
+(attribute (call_expression (member_expression (identifier) @label)))
+(block_attribute_declaration (identifier) @label)
+(block_attribute_declaration (call_expression (identifier) @label))
+(type_expression (identifier) @property)
"(" @punctuation.bracket
")" @punctuation.bracket
@@ -24,3 +34,4 @@
"}" @punctuation.bracket
"=" @operator
"@" @operator
+"@@" @operator