Skip to content

Commit f143950

Browse files
AndrewDantAndrew Dantpre-commit-ci-lite[bot]
authored
C#: Migrate class scope (#2332)
## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet --------- Co-authored-by: Andrew Dant <[email protected]> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent bccc6d8 commit f143950

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"dbaeumer.vscode-eslint",
88
"esbenp.prettier-vscode",
99
"jrieken.vscode-tree-sitter-query",
10-
"wenkokke.tree-sitter-talon"
10+
"wenkokke.tree-sitter-talon",
11+
"usernamehw.commands"
1112
]
1213
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class BankAccount {}
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:27
7+
>---------------------------<
8+
0| public class BankAccount {}
9+
10+
[Insertion delimiter] = "\n\n"

packages/common/src/scopeSupportFacets/csharp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;
1010

1111
export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
1212
ifStatement: supported,
13+
class: supported,
1314
};

packages/cursorless-engine/src/languages/csharp.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ const nodeMatchers: Partial<
141141
Record<SimpleScopeTypeType, NodeMatcherAlternative>
142142
> = {
143143
...getMapMatchers,
144-
class: "class_declaration",
145144
className: "class_declaration[name]",
146145
condition: cascadingMatcher(
147146
conditionMatcher("*[condition]"),

queries/csharp.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
(if_statement) @ifStatement
2+
(class_declaration) @class

0 commit comments

Comments
 (0)