Skip to content

Commit 2c394c0

Browse files
authored
Support "from" action to set instance reference target (#1498)
## Checklist - [ ] 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
1 parent 5e0a244 commit 2c394c0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/actions/actions.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@
1313
mod = Module()
1414

1515

16+
mod.list("cursorless_experimental_action", "Experimental actions")
17+
18+
1619
@mod.capture(
1720
rule=(
1821
"{user.cursorless_simple_action} |"
22+
"{user.cursorless_experimental_action} |"
1923
"{user.cursorless_callback_action} |"
2024
"{user.cursorless_custom_action}"
2125
)
@@ -90,11 +94,19 @@ def ide_command(command_id: str, target: dict, command_options: dict = {}):
9094
}
9195

9296

93-
ACTION_LIST_NAMES = default_values.keys()
97+
ACTION_LIST_NAMES = list(default_values.keys()) + ["experimental_action"]
9498

9599

96100
def on_ready() -> None:
97101
init_csv_and_watch_changes("actions", default_values)
102+
init_csv_and_watch_changes(
103+
"experimental/experimental_actions",
104+
{
105+
"experimental_action": {
106+
"-from": "experimental.setInstanceReference",
107+
}
108+
},
109+
)
98110

99111

100112
app.register("ready", on_ready)

0 commit comments

Comments
 (0)