From 353ae316c9670bc3cdbe8733e9cec5fd2b0ae2f8 Mon Sep 17 00:00:00 2001 From: Victor Quiroz Date: Tue, 28 Jan 2025 23:02:16 +0100 Subject: [PATCH] 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** Screenshot 2025-01-24 at 12 44 57 **Before** Screenshot 2025-01-24 at 12 44 45 Release Notes: - N/A --------- Co-authored-by: Marshall Bowers --- extensions/prisma/extension.toml | 4 ++-- .../prisma/languages/prisma/highlights.scm | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/extensions/prisma/extension.toml b/extensions/prisma/extension.toml index 22b2bd9f2b21836f1a2f1b611770396956b77bbe..fc7ea267ebaa1e6f2e08cb506e38c6961fc67b01 100644 --- a/extensions/prisma/extension.toml +++ b/extensions/prisma/extension.toml @@ -3,7 +3,7 @@ name = "Prisma" description = "Prisma support." version = "0.0.4" schema_version = 1 -authors = ["Matthew Gramigna "] +authors = ["Matthew Gramigna ", "Victor Quiroz "] 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" diff --git a/extensions/prisma/languages/prisma/highlights.scm b/extensions/prisma/languages/prisma/highlights.scm index 5a7d7a812413140f7496a763227b61dde78a213f..c43df8b3b0319dc51f3e8ad3bd0e7dd88b385a21 100644 --- a/extensions/prisma/languages/prisma/highlights.scm +++ b/extensions/prisma/languages/prisma/highlights.scm @@ -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