Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Ruby Language Support #597

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = [
wsxiaoys marked this conversation as resolved.
Show resolved Hide resolved
"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,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this line be tree_sitter_ruby::TAGGING_QUERY?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been fixed in main

"",
)
.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 | 🚫 | 🚫 |