Skip to content

Commit 0eac54d

Browse files
scala
1 parent e5c5463 commit 0eac54d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { NodeMatcherAlternative } from "../typings/Types";
33
import { patternFinder } from "../util/nodeFinders";
44
import {
55
argumentMatcher,
6-
conditionMatcher,
76
createPatternMatchers,
87
leadingMatcher,
98
matcher,
@@ -53,7 +52,6 @@ const nodeMatchers: Partial<
5352
["*[value]", "*[default_value]", "type_definition[type]"],
5453
["="],
5554
),
56-
condition: conditionMatcher("*[condition]"),
5755

5856
// Scala features unsupported in Cursorless terminology
5957
// - Pattern matching

queries/scala.scm

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
(interpolated_string_expression)
88
] @string @textFragment
99

10-
(comment) @comment @textFragment
10+
[
11+
(comment)
12+
(block_comment)
13+
] @comment @textFragment
1114

1215
;; treating classes = classlike
1316
[
@@ -42,6 +45,15 @@
4245
pattern: (_) @name
4346
) @_.domain
4447

48+
(_
49+
condition: (_
50+
.
51+
"(" @condition.start.endOf
52+
")" @condition.end.startOf
53+
.
54+
)
55+
) @_.domain
56+
4557
operator: (operator_identifier) @disqualifyDelimiter
4658
(enumerator
4759
"<-" @disqualifyDelimiter

0 commit comments

Comments
 (0)