Skip to content

Commit d546a79

Browse files
authored
Add tag queries for java, kotlin, protobuf and bash (#14349)
1 parent 7c37e8a commit d546a79

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

book/src/generated/lang-support.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| amber || | | | | `amber-lsp` |
88
| astro || | | | | `astro-ls` |
99
| awk ||| | | | `awk-language-server` |
10-
| bash |||| || `bash-language-server` |
10+
| bash |||| || `bash-language-server` |
1111
| bass || | | | | `bass` |
1212
| beancount || | | | | `beancount-language-server` |
1313
| bibtex || | | | | `texlab` |
@@ -121,7 +121,7 @@
121121
| ink || | | | | |
122122
| inko ||||| | |
123123
| janet || || || |
124-
| java |||| || `jdtls` |
124+
| java |||| || `jdtls` |
125125
| javascript |||||| `typescript-language-server` |
126126
| jinja || | | | | |
127127
| jjconfig |||| | | `taplo`, `tombi` |
@@ -141,7 +141,7 @@
141141
| kconfig || || | | |
142142
| kdl |||| | | |
143143
| koka || || | | `koka` |
144-
| kotlin |||| | | `kotlin-language-server` |
144+
| kotlin |||| | | `kotlin-language-server` |
145145
| koto |||| | | `koto-ls` |
146146
| latex ||| | | | `texlab` |
147147
| ld || || | | |
@@ -201,7 +201,7 @@
201201
| prisma ||| | | | `prisma-language-server` |
202202
| prolog || || | | `swipl` |
203203
| properties ||| | | | |
204-
| protobuf |||| | | `buf`, `pb`, `protols` |
204+
| protobuf |||| | | `buf`, `pb`, `protols` |
205205
| prql || | | | | |
206206
| pug || | | | | |
207207
| purescript ||| | | | `purescript-language-server` |

runtime/queries/bash/tags.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(function_definition name: (word) @definition.function)

runtime/queries/java/tags.scm

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
(class_declaration
2+
name: (identifier) @definition.class)
3+
4+
(interface_declaration
5+
name: (identifier) @definition.interface)
6+
7+
(record_declaration
8+
name: (identifier) @definition.class)
9+
10+
(enum_declaration
11+
name: (identifier) @defintion.class)
12+
13+
(method_declaration
14+
name: (identifier) @definition.function)
15+
16+
(constructor_declaration
17+
name: (identifier) @definition.function)
18+
19+
(compact_constructor_declaration
20+
name: (identifier) @definition.function)
21+
22+
(field_declaration
23+
declarator: (variable_declarator
24+
name: (identifier) @definition.constant))
25+
26+
(enum_constant
27+
name: (identifier) @definition.constant)

runtime/queries/kotlin/tags.scm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(class_declaration
2+
(type_identifier) @definition.class)
3+
4+
(object_declaration
5+
"object" (type_identifier) @definition.class)
6+
7+
(function_declaration
8+
(simple_identifier) @definition.function)
9+
10+
(property_declaration
11+
(variable_declaration
12+
(simple_identifier) @definition.constant))

runtime/queries/protobuf/tags.scm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(message_name (identifier) @definition.class)
2+
3+
(enum_name (identifier) @definition.class)
4+
5+
(service_name (identifier) @definition.class)
6+
7+
(rpc_name (identifier) @definition.function)
8+
9+
(enum_variant_name (identifier) @definition.constant)
10+
11+
(field_name (identifier) @definition.constant)

0 commit comments

Comments
 (0)