Skip to content

Commit

Permalink
feat: Add Ruby Language Support (#597)
Browse files Browse the repository at this point in the history
* feat: add Ruby Support

* fix: address the comments

* Update dataset.rs

---------

Co-authored-by: Meng Zhang <[email protected]>
  • Loading branch information
CrCs2O4 and wsxiaoys authored Oct 20, 2023
1 parent a0a7038 commit da6109c
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 2 deletions.
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.

18 changes: 17 additions & 1 deletion crates/tabby-common/assets/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,20 @@ top_level_keywords = [
"import",
"var",
"const",
]
]

[[config]]
languages = ["ruby"]
line_comment = "#"
top_level_keywords = [
"begin",
"class",
"def",
"end",
"ensure",
"include",
"module",
"require",
"rescue",
"self",
]
1 change: 1 addition & 0 deletions crates/tabby-scheduler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tree-sitter-python = "0.20.2"
tree-sitter-rust = "0.20.3"
tree-sitter-typescript = "0.20.3"
tree-sitter-go = "0.20.0"
tree-sitter-ruby= "0.20.0"

[dev-dependencies]
temp_testdir = "0.2"
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 @@ -270,6 +270,17 @@ lazy_static! {
.unwrap(),
),
),
(
"ruby",
TagsConfigurationSync(
TagsConfiguration::new(
tree_sitter_ruby::language(),
tree_sitter_rust::TAGGING_QUERY,
"",
)
.unwrap(),
),
),
])
};
}
2 changes: 1 addition & 1 deletion website/docs/programming-languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* [TypeScript](https://www.typescriptlang.org/)
* [Golang](https://go.dev/): Since v0.4.0
* [Ruby](https://www.ruby-lang.org/): Since v0.4.0

## Languages Missing Certain Support

Expand All @@ -40,5 +41,4 @@ For an actual example of an issue or pull request adding the above support, plea
| Lua | 🚫 | 🚫 |
| PHP | 🚫 | 🚫 |
| Perl | 🚫 | 🚫 |
| Ruby | 🚫 | 🚫 |
| Scala | 🚫 | 🚫 |

0 comments on commit da6109c

Please sign in to comment.