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(scheduler, docs): Added repository context support for C# #1355

Merged
merged 1 commit into from
Feb 2, 2024
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.

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-go = "0.20.0"
tree-sitter-ruby = "0.20.0"
tree-sitter-c = { git = "https://github.com/tree-sitter/tree-sitter-c/", rev = "212a80f" }
tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "a714740" }
tree-sitter-c-sharp = "0.20.0"
ignore = "0.4.20"
kdam = { version = "0.5.0" }
requirements = "0.3.0"
Expand Down
19 changes: 19 additions & 0 deletions crates/tabby-scheduler/queries/csharp.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(
(class_declaration (identifier) @name) @definition.class
)

(
(struct_declaration (identifier) @name) @definition.struct
)

(
(method_declaration (identifier) @name) @definition.method
)

(
(interface_declaration (identifier) @name) @definition.interface
)

(
(local_function_statement (identifier) @name) @definition.function
)
11 changes: 11 additions & 0 deletions crates/tabby-scheduler/src/dataset/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ lazy_static! {
.unwrap(),
),
),
(
"csharp",
TagsConfigurationSync(
TagsConfiguration::new(
tree_sitter_c_sharp::language(),
include_str!("../../queries/csharp.scm"),
"",
)
.unwrap(),
),
),
])
};
}
2 changes: 1 addition & 1 deletion website/docs/programming-languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ For an actual example of an issue or pull request adding the above support, plea
* [Kotlin](https://www.kotlinlang.org/)
* [C/C++](https://cplusplus.com/), since v0.8.0
* [PHP](https://www.php.net/): Since v0.8.0
* [C#](https://learn.microsoft.com/en-us/dotnet/csharp/): Since v0.9.0

## Languages Missing Certain Support

| Language | Stop Words (time to contribute: <5 min) | Repository Context (time to contribute: <1 hr) |
| :------: | :-------------------------------------: | :--------------------------------------------: |
| C# | 🚫 | 🚫 |
| CSS | 🚫 | 🚫 |
| Haskell | 🚫 | 🚫 |
| Julia | 🚫 | 🚫 |
Expand Down
Loading