feat: Add Ruby Language Support (#597)
* feat: add Ruby Support * fix: address the comments * Update dataset.rs --------- Co-authored-by: Meng Zhang <meng@tabbyml.com>r0.4
parent
a0a703899a
commit
da6109c5af
|
|
@ -3221,6 +3221,7 @@ dependencies = [
|
||||||
"tracing-test",
|
"tracing-test",
|
||||||
"tree-sitter-go",
|
"tree-sitter-go",
|
||||||
"tree-sitter-python",
|
"tree-sitter-python",
|
||||||
|
"tree-sitter-ruby",
|
||||||
"tree-sitter-rust",
|
"tree-sitter-rust",
|
||||||
"tree-sitter-tags",
|
"tree-sitter-tags",
|
||||||
"tree-sitter-typescript",
|
"tree-sitter-typescript",
|
||||||
|
|
@ -3960,6 +3961,16 @@ dependencies = [
|
||||||
"tree-sitter",
|
"tree-sitter",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tree-sitter-ruby"
|
||||||
|
version = "0.20.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0ac30cbb1560363ae76e1ccde543d6d99087421e228cc47afcec004b86bb711a"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
"tree-sitter",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tree-sitter-rust"
|
name = "tree-sitter-rust"
|
||||||
version = "0.20.3"
|
version = "0.20.3"
|
||||||
|
|
|
||||||
|
|
@ -51,3 +51,19 @@ top_level_keywords = [
|
||||||
"var",
|
"var",
|
||||||
"const",
|
"const",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[config]]
|
||||||
|
languages = ["ruby"]
|
||||||
|
line_comment = "#"
|
||||||
|
top_level_keywords = [
|
||||||
|
"begin",
|
||||||
|
"class",
|
||||||
|
"def",
|
||||||
|
"end",
|
||||||
|
"ensure",
|
||||||
|
"include",
|
||||||
|
"module",
|
||||||
|
"require",
|
||||||
|
"rescue",
|
||||||
|
"self",
|
||||||
|
]
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ tree-sitter-python = "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"
|
||||||
|
tree-sitter-ruby= "0.20.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
temp_testdir = "0.2"
|
temp_testdir = "0.2"
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,17 @@ lazy_static! {
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"ruby",
|
||||||
|
TagsConfigurationSync(
|
||||||
|
TagsConfiguration::new(
|
||||||
|
tree_sitter_ruby::language(),
|
||||||
|
tree_sitter_rust::TAGGING_QUERY,
|
||||||
|
"",
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
|
),
|
||||||
|
),
|
||||||
])
|
])
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ For an actual example of an issue or pull request adding the above support, plea
|
||||||
* [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
* [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
||||||
* [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
|
||||||
|
|
||||||
## Languages Missing Certain Support
|
## Languages Missing Certain Support
|
||||||
|
|
||||||
|
|
@ -40,5 +41,4 @@ For an actual example of an issue or pull request adding the above support, plea
|
||||||
| Lua | 🚫 | 🚫 |
|
| Lua | 🚫 | 🚫 |
|
||||||
| PHP | 🚫 | 🚫 |
|
| PHP | 🚫 | 🚫 |
|
||||||
| Perl | 🚫 | 🚫 |
|
| Perl | 🚫 | 🚫 |
|
||||||
| Ruby | 🚫 | 🚫 |
|
|
||||||
| Scala | 🚫 | 🚫 |
|
| Scala | 🚫 | 🚫 |
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue