File tree Expand file tree Collapse file tree 2 files changed +2
-33
lines changed
cursorless-talon/src/targets
packages/cursorless-org-docs/src/docs/user Expand file tree Collapse file tree 2 files changed +2
-33
lines changed Original file line number Diff line number Diff line change 11from typing import Union
22
3- from talon import Context , Module , actions
3+ from talon import Module
44
55from .target_types import ListDestination , PrimitiveDestination
66
1111 desc = "Cursorless insertion mode before/after" ,
1212)
1313mod .list ("cursorless_insertion_mode_to" , desc = "Cursorless insertion mode to" )
14- mod .tag (
15- "cursorless_disable_legacy_destination" ,
16- desc = "Disabled the Cursorless legacy destination(to after) support" ,
17- )
18-
19- ctx = Context ()
20- ctx .matches = r"""
21- tag: user.cursorless_disable_legacy_destination
22- """
2314
2415
25- # DEPRECATED @ 2023-08-01
2616@mod .capture (
27- rule = "([{user.cursorless_insertion_mode_to}] {user.cursorless_insertion_mode_before_after}) | {user.cursorless_insertion_mode_to}"
28- )
29- def cursorless_insertion_mode (m ) -> str :
30- try :
31- before_after = m .cursorless_insertion_mode_before_after
32- if hasattr (m , "cursorless_insertion_mode_to" ):
33- words = m ._unmapped
34- actions .app .notify (
35- f"'{ ' ' .join (words )} ' is deprecated. Please just say '{ words [- 1 ]} '"
36- )
37- return before_after
38- except AttributeError :
39- return "to"
40-
41-
42- @ctx .capture (
43- "user.cursorless_insertion_mode" ,
4417 rule = "{user.cursorless_insertion_mode_before_after} | {user.cursorless_insertion_mode_to}" ,
4518)
46- def cursorless_insertion_mode_ctx (m ) -> str :
19+ def cursorless_insertion_mode (m ) -> str :
4720 try :
4821 return m .cursorless_insertion_mode_before_after
4922 except AttributeError :
Original file line number Diff line number Diff line change @@ -204,7 +204,3 @@ _You can disable the default Cursorless reformat command by prefixing the spoken
204204<user.formatters> form <user.cursorless_target>:
205205 user.cursorless_reformat(cursorless_target, formatters)
206206```
207-
208- ### Disable legacy destination grammar
209-
210- The grammar currently supports ` paste to before air ` . This grammar is considered deprecated/legacy and replaced by ` paste before air ` . You can today disable this legacy grammar by enabling the tag ` user.cursorless_disable_legacy_destination `
You can’t perform that action at this time.
0 commit comments