on master help sign in
add prisma tree-sitter and lsp support (#2703)
0bc7259Ivan
book/src/generated/lang-support.md+1
@@ -67,6 +67,7 @@
67| org | ✓ | | | |
67| org | ✓ | | | |
68| perl | ✓ | ✓ | ✓ | |
68| perl | ✓ | ✓ | ✓ | |
69| php | ✓ | ✓ | ✓ | `intelephense` |
69| php | ✓ | ✓ | ✓ | `intelephense` |
70+| prisma | ✓ | | | `prisma-language-server` |
70| prolog | | | | `swipl` |
71| prolog | | | | `swipl` |
71| protobuf | ✓ | | ✓ | |
72| protobuf | ✓ | | ✓ | |
72| python | ✓ | ✓ | ✓ | `pylsp` |
73| python | ✓ | ✓ | ✓ | `pylsp` |
languages.toml+14
@@ -1449,3 +1449,17 @@ indent = { tab-width = 2, unit = "\t" }
1449[[grammar]]
1449[[grammar]]
1450name = "openscad"
1450name = "openscad"
1451source = { git = "https://github.com/bollian/tree-sitter-openscad", rev = "5c3ce93df0ac1da7197cf6ae125aade26d6b8972" }
1451source = { 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