mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat: add prisma support
This commit is contained in:
parent
d2174f1d29
commit
3da2ab9857
2 changed files with 55 additions and 0 deletions
|
|
@ -780,6 +780,13 @@ list.http = {
|
|||
generate_requires_npm = true,
|
||||
},
|
||||
maintainers = { "@NTBBloodbath" },
|
||||
list.prisma = {
|
||||
install_info = {
|
||||
url = "https://github.com/elianiva/tree-sitter-prisma",
|
||||
branch = "master",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@elianiva" },
|
||||
}
|
||||
|
||||
local M = {
|
||||
|
|
|
|||
48
queries/prisma/highlights.scm
Normal file
48
queries/prisma/highlights.scm
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
[
|
||||
"generator"
|
||||
"datasource"
|
||||
"model"
|
||||
"enum"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
":"
|
||||
","
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
"="
|
||||
"?"
|
||||
] @operator
|
||||
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
(integer) @number
|
||||
(boolean) @constant.builtin
|
||||
(prisma_type) @type.builtin
|
||||
|
||||
(field_type (non_null_type (identifier) @type))
|
||||
(field_type (array_type (non_null_type (identifier) @type)))
|
||||
|
||||
(apply_function (identifier) @function)
|
||||
|
||||
(attribute_specifier (identifier) @attribute)
|
||||
|
||||
(key_value (key (identifier) @attribute))
|
||||
|
||||
(model_single_attribute (identifier) @variable.parameter)
|
||||
(model_multi_attribute (identifier) @variable.parameter)
|
||||
|
||||
(model_field (identifier) @property)
|
||||
|
||||
((identifier) @constant
|
||||
(#vim-match? @constant "^[A-Z_][A-Z\\d_]+$"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue