Skip to content

Commit

Permalink
feat: supports java (#715)
Browse files Browse the repository at this point in the history
* feat: add java language configuration

* feat: add java repository context support

* Update programming-languages.md

* added rev to tree-sitter-java

Signed-off-by: Lei Wen <[email protected]>
Co-authored-by: Lei Wen <[email protected]>
  • Loading branch information
leiwen83 and wenlei03 authored Nov 8, 2023
1 parent b0a62e4 commit 3fb8445
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions crates/tabby-common/assets/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@ top_level_keywords = [
"use",
]

[[config]]
languages = ["java"]
line_comment = "//"
top_level_keywords = [
"abstract",
"public",
"private",
"class",
"const",
"exports",
"extends",
"implements",
"static",
"import",
"interface",
"module",
"package",
"var",
"enum",
"return",
]

[[config]]
languages = ["javascript", "typescript", "javascriptreact", "typescriptreact"]
line_comment = "//"
Expand Down
1 change: 1 addition & 0 deletions crates/tabby-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ lazy_static = { workspace = true }
serde-jsonlines = { workspace = true }
file-rotate = "0.7.5"
tree-sitter-python = "0.20.2"
tree-sitter-java = "0.20.2"
tree-sitter-rust = "0.20.3"
tree-sitter-typescript = "0.20.3"
tree-sitter-go = "0.20.0"
Expand Down
11 changes: 11 additions & 0 deletions crates/tabby-scheduler/src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@ lazy_static! {
.unwrap(),
),
),
(
"java",
TagsConfigurationSync(
TagsConfiguration::new(
tree_sitter_java::language(),
tree_sitter_java::TAGGING_QUERY,
"",
)
.unwrap(),
),
),
(
"javascript-typescript",
TagsConfigurationSync(
Expand Down
2 changes: 1 addition & 1 deletion website/docs/programming-languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ For an actual example of an issue or pull request adding the above support, plea
* [TypeScript](https://www.typescriptlang.org/)
* [Golang](https://go.dev/): Since v0.4.0
* [Ruby](https://www.ruby-lang.org/): Since v0.4.0
* [Java](https://www.java.com/): Since v0.6.0

## Languages Missing Certain Support

Expand All @@ -36,7 +37,6 @@ For an actual example of an issue or pull request adding the above support, plea
| C# | 🚫 | 🚫 |
| CSS | 🚫 | 🚫 |
| Haskell | 🚫 | 🚫 |
| Java | 🚫 | 🚫 |
| Julia | 🚫 | 🚫 |
| Lua | 🚫 | 🚫 |
| PHP | 🚫 | 🚫 |
Expand Down

0 comments on commit 3fb8445

Please sign in to comment.