prisma: Update grammar and syntax highlighting (#23596)

- 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>
This commit is contained in:
Victor Quiroz 2025-01-28 23:02:16 +01:00 committed by GitHub
parent e1646e6ff4
commit 353ae316c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 6 deletions

View file

@ -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"

View file

@ -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