feat: add support for Kotlin language (#813)
* feat: add support for Kotlin * Update programming-languages.md * Update Cargo.toml * fix: kotlin missing TAGGING_QUERY * docs: remove 0.5.0 warning as tabby adapt same format for remote / local storage * feat: make --model optional, so user can start a chat only instance (#817) * fix: mark tabby-ui as yarn managed * fix: rust build caused by 1.74.0 release (#819) * chore: exclude experimental directory for language stats * chore: exclude ee/tabby-webserver/ui to language stats * fix: move db path, fix compile error (#820) * feat(vscode): Add dont-show-again for warnings. Add online help links. (#821) * refactor: delete contrib/jetson/Dockerfile as it's no longer compatible post 0.5 feel free to sending pr of adding it back if you get it work with llama.cpp based docker image * feat(vim): update tabby-agent. (#824) * feat(intellij): Add dont-show-again for warnings. Add more online help links. (#823) * feat: implement basic dependency detection for python / rust (#825) * refactor: extract tags mod for dataset.rs * feat: implement basic dependency detection for python / rust * fix: keep only direct dependency, clean up path (#827) * feat: add support for Kotlin * Update Cargo.toml * fix: adjustment post rebase * fix: added kotlin.scm to cover query tags * fix: updated kotlin.scm * remove definition import Co-authored-by: Meng Zhang <meng@tabbyml.com> * remove typealias Co-authored-by: Meng Zhang <meng@tabbyml.com> --------- Co-authored-by: Meng Zhang <meng@tabbyml.com> Co-authored-by: Eric <illuminating.me@gmail.com> Co-authored-by: Zhiming Ma <codes.icy@gmail.com>r0.6
parent
24b14888ce
commit
b9cb5a025e
|
|
@ -4653,6 +4653,7 @@ dependencies = [
|
|||
"tracing-test",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-java",
|
||||
"tree-sitter-kotlin",
|
||||
"tree-sitter-python",
|
||||
"tree-sitter-ruby",
|
||||
"tree-sitter-rust",
|
||||
|
|
@ -5506,6 +5507,16 @@ dependencies = [
|
|||
"tree-sitter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-kotlin"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b5f367466210220a194a2d8831fc12d15aa13305e7bcdf2dba47714aa328e86"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-python"
|
||||
version = "0.20.2"
|
||||
|
|
|
|||
|
|
@ -41,6 +41,30 @@ top_level_keywords = [
|
|||
"return",
|
||||
]
|
||||
|
||||
[[config]]
|
||||
languages = ["kotlin"]
|
||||
line_comment = "//"
|
||||
top_level_keywords = [
|
||||
"abstract",
|
||||
"public",
|
||||
"private",
|
||||
"companion",
|
||||
"class",
|
||||
"data",
|
||||
"const",
|
||||
"actual",
|
||||
"expect",
|
||||
"sealed",
|
||||
"suspend",
|
||||
"fun",
|
||||
"import",
|
||||
"interface",
|
||||
"package",
|
||||
"var",
|
||||
"val",
|
||||
"enum",
|
||||
]
|
||||
|
||||
[[config]]
|
||||
languages = ["javascript", "typescript", "javascriptreact", "typescriptreact"]
|
||||
line_comment = "//"
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ serde-jsonlines = { workspace = true }
|
|||
file-rotate = "0.7.5"
|
||||
tree-sitter-python = "0.20.2"
|
||||
tree-sitter-java = "0.20.2"
|
||||
tree-sitter-kotlin = "0.3.1"
|
||||
tree-sitter-rust = "0.20.3"
|
||||
tree-sitter-typescript = "0.20.3"
|
||||
tree-sitter-go = "0.20.0"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
(
|
||||
(function_declaration (simple_identifier) @name) @definition.function
|
||||
)
|
||||
|
||||
(
|
||||
(class_declaration (type_identifier) @name) @definition.class
|
||||
)
|
||||
|
||||
(
|
||||
(object_literal (delegation_specifier) @name) @definition.object
|
||||
)
|
||||
|
||||
|
|
@ -157,6 +157,7 @@ lazy_static! {
|
|||
("haskell", vec!["hs"]),
|
||||
("html", vec!["html"]),
|
||||
("java", vec!["java"]),
|
||||
("kotlin", vec!["kt", "kts"]),
|
||||
("julia", vec!["jl"]),
|
||||
("lua", vec!["lua"]),
|
||||
("makefile", vec!["Makefile"]),
|
||||
|
|
|
|||
|
|
@ -73,6 +73,17 @@ lazy_static! {
|
|||
.unwrap(),
|
||||
),
|
||||
),
|
||||
(
|
||||
"kotlin",
|
||||
TagsConfigurationSync(
|
||||
TagsConfiguration::new(
|
||||
tree_sitter_kotlin::language(),
|
||||
include_str!("../../queries/kotlin.scm"),
|
||||
"",
|
||||
)
|
||||
.unwrap(),
|
||||
),
|
||||
),
|
||||
(
|
||||
"javascript-typescript",
|
||||
TagsConfigurationSync(
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ For an actual example of an issue or pull request adding the above support, plea
|
|||
* [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
|
||||
* [Kotlin](https://www.kotlinlang.org/): Since v0.6.0
|
||||
|
||||
## Languages Missing Certain Support
|
||||
|
||||
|
|
@ -42,3 +43,4 @@ For an actual example of an issue or pull request adding the above support, plea
|
|||
| PHP | 🚫 | 🚫 |
|
||||
| Perl | 🚫 | 🚫 |
|
||||
| Scala | 🚫 | 🚫 |
|
||||
| Kotlin | 🚫 | 🚫 |
|
||||
|
|
|
|||
Loading…
Reference in New Issue