on master help sign in
add prisma tree-sitter and lsp support (#2703)

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

commit0bc7259672c525f2bd16e6703f3848d617458836 authorIvan <94393106+seshotake@users.noreply.github.com> dateSun 12 Jun 2022, 22:08 (4 years ago) parente9283b2
3 files changed+71
book/src/generated/lang-support.md+1 languages.toml+14 runtime/queries/prisma/highlights.scm+56
book/src/generated/lang-support.md+1
@@ -67,6 +67,7 @@
6767| org | ✓ | | | |
6868| perl | ✓ | ✓ | ✓ | |
6969| php | ✓ | ✓ | ✓ | `intelephense` |
70+| prisma | ✓ | | | `prisma-language-server` |
7071| prolog | | | | `swipl` |
7172| protobuf | ✓ | | ✓ | |
7273| python | ✓ | ✓ | ✓ | `pylsp` |
languages.toml+14
@@ -1449,3 +1449,17 @@ indent = { tab-width = 2, unit = "\t" }
14491449[[grammar]]
14501450name = "openscad"
14511451source = { git = "https://github.com/bollian/tree-sitter-openscad", rev = "5c3ce93df0ac1da7197cf6ae125aade26d6b8972" }
1452+
1453+[[language]]
1454+name = "prisma"
1455+scope = "source.prisma"
1456+injection-regex = "prisma"
1457+file-types = ["prisma"]
1458+roots = ["package.json"]
1459+comment-token = "//"
1460+language-server = { command = "prisma-language-server", args = ["--stdio"] }
1461+indent = { tab-width = 2, unit = " " }
1462+
1463+[[grammar]]
1464+name = "prisma"
1465+source = { git = "https://github.com/victorhqc/tree-sitter-prisma", rev = "17a59236ac25413b81b1613ea6ba5d8d52d7cd6c" }
runtime/queries/prisma/highlights.scmnew file+56
@@ -0,0 +1,56 @@
1+(string) @string
2+
3+(enumeral) @constant
4+(number) @constant.numeric
5+
6+(variable) @variable
7+(column_type) @type
8+
9+(arguments) @variable.other.member
10+(model_declaration (identifier) @type)
11+
12+[
13+ "datasource"
14+ "enum"
15+ "generator"
16+ "model"
17+ "type"
18+] @keyword
19+
20+[
21+ (comment)
22+ (developer_comment)
23+] @comment
24+
25+[
26+ (attribute)
27+ (block_attribute_declaration)
28+ (call_expression)
29+] @function.builtin
30+
31+[
32+ (true)
33+ (false)
34+ (null)
35+] @constant.builtin.boolean
36+
37+[
38+ "("
39+ ")"
40+ "["
41+ "]"
42+ "{"
43+ "}"
44+] @punctuation.bracket
45+
46+[
47+ ":"
48+ ","
49+] @punctuation.delimiter
50+
51+[
52+ "="
53+ "@"
54+ "@@"
55+ (binary_expression)
56+] @operator