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",
|
||||||
"tracing-test",
|
"tracing-test",
|
||||||
"tree-sitter-go",
|
"tree-sitter-go",
|
||||||
|
"tree-sitter-java",
|
||||||
"tree-sitter-python",
|
"tree-sitter-python",
|
||||||
"tree-sitter-ruby",
|
"tree-sitter-ruby",
|
||||||
"tree-sitter-rust",
|
"tree-sitter-rust",
|
||||||
|
|
@ -4902,6 +4903,16 @@ dependencies = [
|
||||||
"tree-sitter",
|
"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]]
|
[[package]]
|
||||||
name = "tree-sitter-python"
|
name = "tree-sitter-python"
|
||||||
version = "0.20.2"
|
version = "0.20.2"
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,28 @@ top_level_keywords = [
|
||||||
"use",
|
"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]]
|
[[config]]
|
||||||
languages = ["javascript", "typescript", "javascriptreact", "typescriptreact"]
|
languages = ["javascript", "typescript", "javascriptreact", "typescriptreact"]
|
||||||
line_comment = "//"
|
line_comment = "//"
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ lazy_static = { workspace = true }
|
||||||
serde-jsonlines = { workspace = true }
|
serde-jsonlines = { workspace = true }
|
||||||
file-rotate = "0.7.5"
|
file-rotate = "0.7.5"
|
||||||
tree-sitter-python = "0.20.2"
|
tree-sitter-python = "0.20.2"
|
||||||
|
tree-sitter-java = "0.20.2"
|
||||||
tree-sitter-rust = "0.20.3"
|
tree-sitter-rust = "0.20.3"
|
||||||
tree-sitter-typescript = "0.20.3"
|
tree-sitter-typescript = "0.20.3"
|
||||||
tree-sitter-go = "0.20.0"
|
tree-sitter-go = "0.20.0"
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,17 @@ lazy_static! {
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"java",
|
||||||
|
TagsConfigurationSync(
|
||||||
|
TagsConfiguration::new(
|
||||||
|
tree_sitter_java::language(),
|
||||||
|
tree_sitter_java::TAGGING_QUERY,
|
||||||
|
"",
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
|
),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"javascript-typescript",
|
"javascript-typescript",
|
||||||
TagsConfigurationSync(
|
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/)
|
* [TypeScript](https://www.typescriptlang.org/)
|
||||||
* [Golang](https://go.dev/): Since v0.4.0
|
* [Golang](https://go.dev/): Since v0.4.0
|
||||||
* [Ruby](https://www.ruby-lang.org/): 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
|
## Languages Missing Certain Support
|
||||||
|
|
||||||
|
|
@ -36,7 +37,6 @@ For an actual example of an issue or pull request adding the above support, plea
|
||||||
| C# | 🚫 | 🚫 |
|
| C# | 🚫 | 🚫 |
|
||||||
| CSS | 🚫 | 🚫 |
|
| CSS | 🚫 | 🚫 |
|
||||||
| Haskell | 🚫 | 🚫 |
|
| Haskell | 🚫 | 🚫 |
|
||||||
| Java | 🚫 | 🚫 |
|
|
||||||
| Julia | 🚫 | 🚫 |
|
| Julia | 🚫 | 🚫 |
|
||||||
| Lua | 🚫 | 🚫 |
|
| Lua | 🚫 | 🚫 |
|
||||||
| PHP | 🚫 | 🚫 |
|
| PHP | 🚫 | 🚫 |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue