Skip to content

Commit 6824ddc

Browse files
authored
feat(index): add GDScript language support. (#3812)
1 parent 4ab392f commit 6824ddc

File tree

6 files changed

+49
-0
lines changed

6 files changed

+49
-0
lines changed

Cargo.lock

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/tabby-common/assets/languages.toml

+14
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,17 @@ top_level_keywords = [
420420
"while",
421421
"with",
422422
]
423+
424+
[[config]]
425+
languages = ["gdscript"]
426+
exts = ["gd", "tscn", "tres"]
427+
line_comment = "#"
428+
top_level_keywords = [
429+
"var",
430+
"const",
431+
"enum",
432+
"func",
433+
"class",
434+
"class_name",
435+
"extends",
436+
]

crates/tabby-index/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ tree-sitter-c-sharp = "0.21.2"
2525
tree-sitter-solidity = { git = "https://github.com/JoranHonig/tree-sitter-solidity", rev = "0e86ae647bda22c9bee00ec59752df7b3d3b000b" }
2626
tree-sitter-lua = "0.1.0"
2727
tree-sitter-elixir = "0.2.0"
28+
tree-sitter-gdscript = { git = "https://github.com/faceCutWall/tree-sitter-gdscript", rev = "8a8c067899d734840e8ce86fdeeeadbe8088446b" }
2829
ignore.workspace = true
2930
tokio = { workspace = true, features = ["process"] }
3031
text-splitter = { version = "0.13.3", features = ["code"] }
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
(
3+
(class_definition (name) @name) @definition.class
4+
)
5+
6+
(
7+
(function_definition (name) @name) @definition.function
8+
)
9+
10+
(
11+
(call (identifier) @name) @reference.call
12+
)

crates/tabby-index/src/code/languages.rs

+11
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,17 @@ lazy_static! {
158158
.unwrap(),
159159
),
160160
),
161+
(
162+
"gdscript",
163+
TagsConfigurationSync(
164+
TagsConfiguration::new(
165+
tree_sitter_gdscript::language(),
166+
include_str!("../../queries/gdscript.scm"),
167+
"",
168+
)
169+
.unwrap(),
170+
),
171+
),
161172
])
162173
};
163174
}

website/docs/references/programming-languages.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ For an actual example of an issue or pull request adding the above support, plea
3838
* [Lua](https://www.lua.org)
3939
* [Elixir](https://elixir-lang.org)
4040
* [OCaml](https://ocaml.org/)
41+
* [GDScript](https://gdscript.com/)
4142

4243
## Languages Missing Certain Support
4344

0 commit comments

Comments
 (0)