Skip to content

Commit 098665b

Browse files
Rename file
1 parent 6871c3d commit 098665b

File tree

9 files changed

+63
-79
lines changed

9 files changed

+63
-79
lines changed

data/fixtures/scopes/css/argument.actual.iteration.scope

Lines changed: 0 additions & 12 deletions
This file was deleted.

data/fixtures/scopes/css/argument.actual.scope

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* {
2+
color: red;
3+
}
4+
5+
---
6+
7+
[Range] =
8+
[Domain] = 0:0-3:0
9+
>---
10+
0| * {
11+
1| color: red;
12+
2| }
13+
3|
14+
<
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* {
2+
color: red;
3+
}
4+
---
5+
6+
[Content] =
7+
[Removal] =
8+
[Domain] = 0:0-2:1
9+
>---
10+
0| * {
11+
1| color: red;
12+
2| }
13+
-<
14+
15+
[Insertion delimiter] = "\n"

packages/common/src/scopeSupportFacets/css.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
22
import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
33

4-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
54
const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;
65

76
export const cssScopeSupport: LanguageScopeSupportFacetMap = {
@@ -13,9 +12,6 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
1312
functionCall: supported,
1413
functionCallee: supported,
1514

16-
"argument.actual": supported,
17-
"argument.actual.iteration": supported,
18-
1915
"name.iteration.document": supported,
2016
"name.iteration.block": supported,
2117

@@ -31,6 +27,14 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
3127
"collectionItem.unenclosed": supported,
3228
"collectionItem.unenclosed.iteration": supported,
3329

30+
statement: supported,
31+
"statement.iteration.document": supported,
32+
33+
// Unsupported, still in legacy
34+
35+
"argument.actual": unsupported,
36+
"argument.actual.iteration": unsupported,
37+
3438
// Not applicable
3539

3640
anonymousFunction: notApplicable,
@@ -128,10 +132,8 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
128132
"section.iteration.parent": notApplicable,
129133
section: notApplicable,
130134
startTag: notApplicable,
131-
"statement.class": notApplicable,
132135
"statement.iteration.block": notApplicable,
133-
"statement.iteration.document": notApplicable,
134-
statement: notApplicable,
136+
"statement.class": notApplicable,
135137
"string.multiLine": notApplicable,
136138
switchStatementSubject: notApplicable,
137139
tags: notApplicable,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
export const legacyLanguageIds = [
66
"clojure",
7+
"css",
78
"latex",
89
"ruby",
910
"rust",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const languageMatchers: Record<
4545
Partial<Record<SimpleScopeTypeType, NodeMatcher>>
4646
> = {
4747
clojure,
48+
css: scss,
4849
latex,
4950
ruby,
5051
rust,

queries/css.scm

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
(#character-range! @textFragment 1 -1)
1919
)
2020

21+
;;!! /* Hello */
22+
;;! ^^^^^^^^^^^
2123
(comment) @comment @textFragment
2224

2325
;;!! calc(100% - 50px);
@@ -56,26 +58,27 @@
5658

5759
;;!! translate(-50%, -50%)
5860
;;! ^^^^ ^^^^
59-
(
60-
(arguments
61-
(_)? @_.leading.endOf
62-
.
63-
(_) @argumentOrParameter
64-
.
65-
(_)? @_.trailing.startOf
66-
)
67-
(#insertion-delimiter! @argumentOrParameter ", ")
68-
)
69-
70-
(arguments
71-
.
72-
"(" @argumentOrParameter.iteration.start.endOf
73-
")" @argumentOrParameter.iteration.end.startOf
74-
.
75-
) @argumentOrParameter.iteration.domain
61+
;; (
62+
;; (arguments
63+
;; (_)? @_.leading.endOf
64+
;; .
65+
;; (_) @argumentOrParameter
66+
;; .
67+
;; (_)? @_.trailing.startOf
68+
;; )
69+
;; (#insertion-delimiter! @argumentOrParameter ", ")
70+
;; )
71+
72+
;; (arguments
73+
;; .
74+
;; "(" @argumentOrParameter.iteration.start.endOf
75+
;; ")" @argumentOrParameter.iteration.end.startOf
76+
;; .
77+
;; ) @argumentOrParameter.iteration.domain
7678

7779
;; Entire file
7880
(stylesheet) @name.iteration @collectionKey.iteration @value.iteration
81+
(stylesheet) @statement.iteration
7982

8083
;; { }
8184
(block
@@ -87,17 +90,12 @@
8790

8891
;;!! width: 100px;
8992
;;! ^^
90-
(integer_value
91-
(unit) @unit
92-
) @_.domain
93-
94-
;;!! padding: 25px 50px
95-
;;! ^^^^^^^^^^^^^^^^^^
9693
(declaration
9794
(integer_value
98-
(unit)
95+
(unit) @unit
9996
)
100-
) @unit.iteration
97+
(#allow-multiple! @unit)
98+
) @_.domain
10199

102100
;;!! @namespace prefix "XML-namespace-URL";
103101
;;! ^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)