Skip to content

Commit

Permalink
feat: add c# support
Browse files Browse the repository at this point in the history
  • Loading branch information
romamihalich authored and lewis6991 committed Apr 4, 2023
1 parent 9e23f06 commit 68eaeb8
Show file tree
Hide file tree
Showing 3 changed files with 435 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use 'nvim-treesitter/nvim-treesitter-context'

- [x] `bash`
- [x] `c`
- [x] `c_sharp`
- [x] `cpp`
- [x] `dart`
- [x] `elixir`
Expand Down Expand Up @@ -64,7 +65,6 @@ use 'nvim-treesitter/nvim-treesitter-context'
- [ ] `bibtex`
- [ ] `bicep`
- [ ] `blueprint`
- [ ] `c_sharp`
- [ ] `capnp`
- [ ] `chatito`
- [ ] `clojure`
Expand Down
70 changes: 70 additions & 0 deletions queries/c_sharp/context.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
(interface_declaration
body: (_) @context.end
) @context

(class_declaration
body: (_) @context.end
) @context

(enum_declaration
body: (_) @context.end
) @context

(struct_declaration
body: (_) @context.end
) @context

(record_declaration
body: (_) @context.end
) @context

(record_struct_declaration
body: (_) @context.end
) @context

(namespace_declaration
body: (_) @context.end
) @context

(constructor_declaration
body: (_) @context.end
) @context

(destructor_declaration
body: (_) @context.end
) @context

(method_declaration
body: (_) @context.end
) @context

(switch_statement
body: (_) @context.end
) @context

(for_each_statement
body: (_) @context.end
) @context

(for_statement
body: (_) @context.end
) @context

(if_statement
consequence: (_) @context.end
) @context

([
(do_statement)
(while_statement)
] @context)

(try_statement
body: (_) @context.end
) @context

(catch_clause
body: (_) @context.end
) @context

(finally_clause) @context
Loading

0 comments on commit 68eaeb8

Please sign in to comment.