Skip to content

Commit

Permalink
feat(scheduler, docs): Add repo context support for C#, added languag…
Browse files Browse the repository at this point in the history
…e to supported list in docs (#1355)
  • Loading branch information
TylerBurnett authored Feb 2, 2024
1 parent 2267083 commit 9c1c09b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
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

0 comments on commit 9c1c09b

Please sign in to comment.