Skip to content

Commit 7a8fbda

Browse files
Add missing language support and highlight queries
1. SCSS/SASS/Less: Split CSS extension into separate language IDs for scss, sass, and less so each is recognized independently. 2. XML: New extension with highlight queries for XML, SVG, XSL, and .NET project files. 3. Dockerfile: Add highlight queries for Dockerfile syntax (keywords, images, variables, ports). 4. SQL: Add comprehensive highlight queries covering DDL, DML, types, functions, and operators. 5. Ruby: Add solargraph LSP capability to existing Ruby extension. 6. Terraform/HCL: New extension with terraform-ls LSP and highlight queries for HCL blocks, attributes, expressions, and templates. 7. Protobuf: New extension with highlight queries for proto3 messages, enums, services, and RPC definitions. 8. Svelte: Add highlight queries for Svelte template syntax including control flow blocks and expressions. 9. GraphQL: Add highlight queries for queries, mutations, types, fields, directives, and variables.
1 parent bc7c060 commit 7a8fbda

15 files changed

Lines changed: 938 additions & 20 deletions

File tree

extensions/css/extension.json

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,31 @@
44
"name": "CSS",
55
"displayName": "CSS",
66
"version": "1.0.0",
7-
"description": "CSS language support with LSP and formatting",
7+
"description": "CSS, SCSS, SASS, and Less language support with LSP and formatting",
88
"publisher": "Athas",
99
"categories": [
1010
"Language"
1111
],
1212
"languages": [
1313
{
1414
"id": "css",
15-
"extensions": [
16-
".css",
17-
".scss",
18-
".sass",
19-
".less"
20-
],
21-
"aliases": [
22-
"CSS"
23-
]
15+
"extensions": [".css"],
16+
"aliases": ["CSS"]
17+
},
18+
{
19+
"id": "scss",
20+
"extensions": [".scss"],
21+
"aliases": ["SCSS"]
22+
},
23+
{
24+
"id": "sass",
25+
"extensions": [".sass"],
26+
"aliases": ["Sass"]
27+
},
28+
{
29+
"id": "less",
30+
"extensions": [".less"],
31+
"aliases": ["Less"]
2432
}
2533
],
2634
"capabilities": {
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
(comment) @comment
2+
3+
[
4+
"FROM"
5+
"AS"
6+
"RUN"
7+
"CMD"
8+
"LABEL"
9+
"EXPOSE"
10+
"ENV"
11+
"ADD"
12+
"COPY"
13+
"ENTRYPOINT"
14+
"VOLUME"
15+
"USER"
16+
"WORKDIR"
17+
"ARG"
18+
"ONBUILD"
19+
"STOPSIGNAL"
20+
"HEALTHCHECK"
21+
"SHELL"
22+
"MAINTAINER"
23+
"CROSS_BUILD"
24+
] @keyword
25+
26+
(image_spec
27+
(image_name) @string)
28+
29+
(image_spec
30+
(image_tag
31+
"/" @operator
32+
(image_name) @string))
33+
34+
(image_spec
35+
(image_tag) @string.special)
36+
37+
(image_spec
38+
(image_digest) @string.special)
39+
40+
(image_alias) @variable
41+
42+
(double_quoted_string) @string
43+
(single_quoted_string) @string
44+
(unquoted_string) @string
45+
46+
(expansion
47+
"$" @punctuation.special)
48+
(expansion
49+
(variable) @variable)
50+
51+
(expose_port) @number
52+
53+
(label_pair
54+
key: (unquoted_string) @property)
55+
56+
(env_pair
57+
name: (unquoted_string) @variable)
58+
59+
(arg_instruction
60+
name: (unquoted_string) @variable)
61+
62+
(param
63+
"--" @operator)
64+
(param
65+
(mount_param_param) @property)
66+
67+
(shell_command) @string
68+
69+
[
70+
"="
71+
":"
72+
] @operator
73+
74+
[
75+
"["
76+
"]"
77+
] @punctuation.bracket

extensions/graphql/highlights.scm

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
(comment) @comment
2+
3+
[
4+
"query"
5+
"mutation"
6+
"subscription"
7+
"fragment"
8+
"on"
9+
"type"
10+
"interface"
11+
"union"
12+
"enum"
13+
"input"
14+
"scalar"
15+
"schema"
16+
"directive"
17+
"extend"
18+
"implements"
19+
"repeatable"
20+
] @keyword
21+
22+
(operation_definition
23+
name: (name) @function)
24+
25+
(fragment_definition
26+
name: (name) @function)
27+
28+
(fragment_spread
29+
name: (name) @function)
30+
31+
(object_type_definition
32+
name: (name) @type)
33+
34+
(interface_type_definition
35+
name: (name) @type)
36+
37+
(union_type_definition
38+
name: (name) @type)
39+
40+
(enum_type_definition
41+
name: (name) @type)
42+
43+
(input_object_type_definition
44+
name: (name) @type)
45+
46+
(scalar_type_definition
47+
name: (name) @type)
48+
49+
(named_type
50+
(name) @type)
51+
52+
(field
53+
name: (name) @property)
54+
55+
(field_definition
56+
name: (name) @property)
57+
58+
(input_value_definition
59+
name: (name) @property)
60+
61+
(alias
62+
(name) @property)
63+
64+
(argument
65+
name: (name) @variable.parameter)
66+
67+
(directive
68+
"@" @punctuation.special
69+
name: (name) @attribute)
70+
71+
(enum_value) @constant
72+
73+
(variable
74+
"$" @punctuation.special
75+
name: (name) @variable)
76+
77+
(string_value) @string
78+
(int_value) @number
79+
(float_value) @number
80+
(boolean_value) @constant.builtin
81+
(null_value) @constant.builtin
82+
83+
[
84+
"="
85+
"|"
86+
"&"
87+
"!"
88+
":"
89+
"..."
90+
] @operator
91+
92+
[
93+
"{"
94+
"}"
95+
"["
96+
"]"
97+
"("
98+
")"
99+
] @punctuation.bracket
100+
101+
[
102+
","
103+
] @punctuation.delimiter

extensions/protobuf/extension.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://athas.dev/schemas/extension.json",
3+
"id": "athas.protobuf",
4+
"name": "Protobuf",
5+
"displayName": "Protocol Buffers",
6+
"version": "1.0.0",
7+
"description": "Protocol Buffers language support with syntax highlighting",
8+
"publisher": "Athas",
9+
"categories": [
10+
"Language"
11+
],
12+
"languages": [
13+
{
14+
"id": "protobuf",
15+
"extensions": [".proto"],
16+
"aliases": ["Protocol Buffers", "Protobuf", "proto"]
17+
}
18+
]
19+
}

extensions/protobuf/highlights.scm

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
(comment) @comment
2+
3+
[
4+
"syntax"
5+
"package"
6+
"import"
7+
"public"
8+
"weak"
9+
"option"
10+
"message"
11+
"enum"
12+
"service"
13+
"rpc"
14+
"returns"
15+
"stream"
16+
"extend"
17+
"oneof"
18+
"map"
19+
"reserved"
20+
"to"
21+
"extensions"
22+
"optional"
23+
"required"
24+
"repeated"
25+
] @keyword
26+
27+
(syntax) @keyword
28+
29+
(package
30+
(full_ident) @namespace)
31+
32+
(import
33+
(string) @string)
34+
35+
(option_name) @property
36+
37+
(message_name) @type
38+
(enum_name) @type
39+
(service_name) @type
40+
(rpc_name) @function
41+
42+
(message_body
43+
(field
44+
(identifier) @property))
45+
46+
(enum_body
47+
(enum_field
48+
(identifier) @constant))
49+
50+
(type) @type.builtin
51+
52+
(string) @string
53+
(int_lit) @number
54+
(float_lit) @number
55+
56+
(bool) @constant.builtin
57+
58+
[
59+
"="
60+
] @operator
61+
62+
[
63+
"{"
64+
"}"
65+
"["
66+
"]"
67+
"("
68+
")"
69+
"<"
70+
">"
71+
] @punctuation.bracket
72+
73+
[
74+
";"
75+
","
76+
"."
77+
] @punctuation.delimiter

extensions/ruby/extension.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,14 @@
5252
"Puppetfile"
5353
]
5454
}
55-
]
55+
],
56+
"capabilities": {
57+
"lsp": {
58+
"name": "solargraph",
59+
"runtime": "binary",
60+
"args": [
61+
"stdio"
62+
]
63+
}
64+
}
5665
}

0 commit comments

Comments
 (0)