feat: supports java (#715)
* 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 <wenlei03@qiyi.com> Co-authored-by: Lei Wen <wenlei03@qiyi.com>refactor-extract-code
parent
b0a62e4af9
commit
3fb8445747
|
|
@ -4158,6 +4158,7 @@ dependencies = [
|
|||
"tracing",
|
||||
"tracing-test",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-java",
|
||||
"tree-sitter-python",
|
||||
"tree-sitter-ruby",
|
||||
"tree-sitter-rust",
|
||||
|
|
@ -4902,6 +4903,16 @@ dependencies = [
|
|||
"tree-sitter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-java"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2adc5696bf5abf761081d7457d2bb82d0e3b28964f4214f63fd7e720ef462653"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-python"
|
||||
version = "0.20.2"
|
||||
|
|
|
|||
|
|
@ -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 = "//"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -238,6 +238,17 @@ lazy_static! {
|
|||
.unwrap(),
|
||||
),
|
||||
),
|
||||
(
|
||||
"java",
|
||||
TagsConfigurationSync(
|
||||
TagsConfiguration::new(
|
||||
tree_sitter_java::language(),
|
||||
tree_sitter_java::TAGGING_QUERY,
|
||||
"",
|
||||
)
|
||||
.unwrap(),
|
||||
),
|
||||
),
|
||||
(
|
||||
"javascript-typescript",
|
||||
TagsConfigurationSync(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
@ -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 | 🚫 | 🚫 |
|
||||
|
|
|
|||
Loading…
Reference in New Issue