Skip to content

Commit cbbb437

Browse files
Merge branch 'main' into cssMigration
2 parents 96e5dad + 34a6bf5 commit cbbb437

File tree

271 files changed

+7245
-1308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+7245
-1308
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343

4444
- name: Publish to Open VSX Registry
4545
id: publishToOpenVSX
46-
uses: HaaLeo/publish-vscode-extension@v1
46+
uses: HaaLeo/publish-vscode-extension@v2
4747
with:
4848
pat: ${{ secrets.OPEN_VSX_TOKEN }}
4949
packagePath: packages/cursorless-vscode/dist
5050

5151
- name: Publish to Visual Studio Marketplace
52-
uses: HaaLeo/publish-vscode-extension@v1
52+
uses: HaaLeo/publish-vscode-extension@v2
5353
with:
5454
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
5555
registryUrl: https://marketplace.visualstudio.com

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114

115115
- name: Test create vsix
116116
id: createVsix
117-
uses: HaaLeo/publish-vscode-extension@v1
117+
uses: HaaLeo/publish-vscode-extension@v2
118118
with:
119119
pat: none
120120
packagePath: packages/cursorless-vscode/dist

CHANGELOG.md

Lines changed: 2 additions & 584 deletions
Large diffs are not rendered by default.

changelog/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Change log entries
2+
3+
This directory contains the raw changelog entries that we will one day use to generate proper release notes. Until then, you can read them here, imagining them in their beautiful future form.

cursorless-talon/src/csv_overrides.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def init_csv_and_watch_changes(
6565
extra_ignored_values: Optional[list[str]] = None,
6666
extra_allowed_values: Optional[list[str]] = None,
6767
allow_unknown_values: bool = False,
68+
deprecated: bool = False,
6869
default_list_name: Optional[str] = None,
6970
headers: list[str] = [SPOKEN_FORM_HEADER, CURSORLESS_IDENTIFIER_HEADER],
7071
no_update_file: bool = False,
@@ -123,6 +124,12 @@ def init_csv_and_watch_changes(
123124
pluralize_lists = []
124125

125126
file_path = get_full_path(filename)
127+
is_file = file_path.is_file()
128+
129+
# Deprecated file that doesn't exist. Do nothing.
130+
if deprecated and not is_file:
131+
return lambda: None
132+
126133
super_default_values = get_super_values(default_values)
127134

128135
file_path.parent.mkdir(parents=True, exist_ok=True)
@@ -151,9 +158,9 @@ def on_watch(path, flags):
151158
handle_new_values=handle_new_values,
152159
)
153160

154-
fs.watch(str(file_path.parent), on_watch)
161+
fs.watch(file_path.parent, on_watch)
155162

156-
if file_path.is_file():
163+
if is_file:
157164
current_values = update_file(
158165
path=file_path,
159166
headers=headers,
@@ -188,7 +195,7 @@ def on_watch(path, flags):
188195
)
189196

190197
def unsubscribe():
191-
fs.unwatch(str(file_path.parent), on_watch)
198+
fs.unwatch(file_path.parent, on_watch)
192199

193200
return unsubscribe
194201

@@ -385,7 +392,7 @@ def csv_error(path: Path, index: int, message: str, value: str):
385392
index (int): The index into the file (for error reporting)
386393
text (str): The text of the error message to report if condition is false
387394
"""
388-
print(f"ERROR: {path}:{index+1}: {message} '{value}'")
395+
print(f"ERROR: {path}:{index + 1}: {message} '{value}'")
389396

390397

391398
def read_file(

cursorless-talon/src/spoken_forms.json

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -233,29 +233,9 @@
233233
"-from": "experimental.setInstanceReference"
234234
}
235235
},
236-
"experimental/wrapper_snippets.csv": {
237-
"wrapper_snippet": {
238-
"else": "ifElseStatement.alternative",
239-
"funk": "functionDeclaration.body",
240-
"if else": "ifElseStatement.consequence",
241-
"if": "ifStatement.consequence",
242-
"try": "tryCatchStatement.body",
243-
"link": "link.text"
244-
}
245-
},
246-
"experimental/insertion_snippets.csv": {
247-
"insertion_snippet_no_phrase": {
248-
"if": "ifStatement",
249-
"if else": "ifElseStatement",
250-
"try": "tryCatchStatement"
251-
}
252-
},
253-
"experimental/insertion_snippets_single_phrase.csv": {
254-
"insertion_snippet_single_phrase": {
255-
"funk": "functionDeclaration.name",
256-
"link": "link.text"
257-
}
258-
},
236+
"experimental/wrapper_snippets.csv": {},
237+
"experimental/insertion_snippets.csv": {},
238+
"experimental/insertion_snippets_single_phrase.csv": {},
259239
"experimental/miscellaneous.csv": {
260240
"phrase_terminator": { "over": "phraseTerminator" }
261241
},

cursorless-talon/src/spoken_forms.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,26 @@ def handle_new_values(csv_name: str, values: list[SpokenFormEntry]):
167167
# DEPRECATED @ 2025-02-01
168168
handle_csv(
169169
"experimental/wrapper_snippets.csv",
170+
deprecated=True,
170171
allow_unknown_values=True,
171172
default_list_name="wrapper_snippet",
172173
),
173174
handle_csv(
174175
"experimental/insertion_snippets.csv",
176+
deprecated=True,
175177
allow_unknown_values=True,
176178
default_list_name="insertion_snippet_no_phrase",
177179
),
178180
handle_csv(
179181
"experimental/insertion_snippets_single_phrase.csv",
182+
deprecated=True,
180183
allow_unknown_values=True,
181184
default_list_name="insertion_snippet_single_phrase",
182185
),
183-
handle_csv("experimental/miscellaneous.csv"),
186+
handle_csv(
187+
"experimental/miscellaneous.csv",
188+
deprecated=True,
189+
),
184190
# ---
185191
handle_csv(
186192
"experimental/actions_custom.csv",
@@ -235,7 +241,7 @@ def on_ready():
235241

236242
registry.register("update_captures", update_captures_debounced)
237243

238-
fs.watch(str(JSON_FILE.parent), on_watch)
244+
fs.watch(JSON_FILE.parent, on_watch)
239245

240246

241247
app.register("ready", on_ready)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
languageId: plaintext
2+
command:
3+
version: 5
4+
spokenForm: take each
5+
action: {name: setSelection}
6+
targets:
7+
- type: primitive
8+
mark: {type: decoratedSymbol, symbolColor: default, character: e}
9+
usePrePhraseSnapshot: false
10+
initialState:
11+
documentContents: hello world
12+
selections:
13+
- anchor: {line: 0, character: 11}
14+
active: {line: 0, character: 11}
15+
marks:
16+
default.e:
17+
start: {line: 0, character: 0}
18+
end: {line: 0, character: 5}
19+
finalState:
20+
documentContents: hello world
21+
selections:
22+
- anchor: {line: 0, character: 0}
23+
active: {line: 0, character: 5}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
languageId: plaintext
2+
command:
3+
version: 7
4+
spokenForm: take each
5+
action:
6+
name: setSelection
7+
target:
8+
type: primitive
9+
mark: {type: decoratedSymbol, symbolColor: default, character: e}
10+
usePrePhraseSnapshot: false
11+
initialState:
12+
documentContents: hello world
13+
selections:
14+
- anchor: {line: 0, character: 11}
15+
active: {line: 0, character: 11}
16+
marks:
17+
default.e:
18+
start: {line: 0, character: 0}
19+
end: {line: 0, character: 5}
20+
finalState:
21+
documentContents: hello world
22+
selections:
23+
- anchor: {line: 0, character: 0}
24+
active: {line: 0, character: 5}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div id="me"><div>
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:8-0:12
7+
>----<
8+
0| <div id="me"><div>
9+
10+
[Insertion delimiter] = " "

0 commit comments

Comments
 (0)