Skip to content

Commit bb5d7b0

Browse files
Added pre commit hooks for Talon and Tree sitter query files (#3207)
1 parent bb74005 commit bb5d7b0

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

.editorconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ max_line_length = 80
1111
trim_trailing_whitespace = true
1212

1313
[*.{py,talon}]
14-
indent_style = space
1514
indent_size = 4
1615

16+
[*.talon]
17+
preserve_multiline = true
18+
1719
[*.svg]
1820
insert_final_newline = false
1921

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ repos:
8686
args: [--fix, --exit-non-zero-on-fix]
8787
- id: ruff-format
8888

89+
- repo: https://github.com/cursorless-dev/talon-tools
90+
rev: v0.1.9
91+
hooks:
92+
- id: talon-fmt
93+
- id: tree-sitter-fmt
94+
8995
- repo: https://github.com/lunarmodules/luacheck
9096
rev: v1.2.0
9197
hooks:

cursorless-talon-dev/src/cursorless_launch_configuration.talon-list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ list: user.cursorless_launch_configuration
22
app: vscode
33
win.title: /cursorless/
44
-
5+
56
extension: "VSCode: Run"
67
test: "VSCode: Test"
78
test subset: "VSCode: Test (subset)"

cursorless-talon-dev/src/cursorless_test.talon

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test api insert <user.word> and <user.word> <user.cursorless_destination>:
2323

2424
test api insert snippet:
2525
user.cursorless_insert_snippet("Hello, $foo! My name is $bar!")
26-
test api insert snippet <user.cursorless_destination> :
26+
test api insert snippet <user.cursorless_destination>:
2727
user.cursorless_insert_snippet("Hello, $foo! My name is $bar!", cursorless_destination, "statement")
2828
test api wrap with snippet <user.cursorless_target>:
2929
user.cursorless_wrap_with_snippet("Hello, $foo! My name is $bar!", cursorless_target, "foo", "statement")
@@ -33,8 +33,10 @@ test api alternate highlight nothing:
3333
user.private_cursorless_test_alternate_highlight_nothing()
3434

3535
test api parsed chuck block: user.cursorless_x_custom_command("chuck block")
36-
test api parsed take next token: user.cursorless_x_custom_command("take next token")
37-
test api parsed change next instance: user.cursorless_x_custom_command("change next instance")
36+
test api parsed take next token:
37+
user.cursorless_x_custom_command("take next token")
38+
test api parsed change next instance:
39+
user.cursorless_x_custom_command("change next instance")
3840
test api parsed <user.cursorless_target>:
3941
user.cursorless_x_custom_command("chuck block <target>", cursorless_target)
4042
test api parsed <user.cursorless_target> plus <user.cursorless_target>:

0 commit comments

Comments
 (0)