Skip to content

Commit ac60779

Browse files
Migrate argument
1 parent 3993034 commit ac60779

4 files changed

Lines changed: 17 additions & 79 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
* The language IDs that we have full tree-sitter support for using our legacy
33
* modifiers.
44
*/
5-
export const legacyLanguageIds = ["clojure", "latex", "rust"] as const;
5+
export const legacyLanguageIds = ["latex", "rust"] as const;
66

77
export type LegacyLanguageId = (typeof legacyLanguageIds)[number];

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

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

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1+
import type { SimpleScopeTypeType } from "@cursorless/common";
12
import { UnsupportedLanguageError } from "@cursorless/common";
23
import type { Node } from "web-tree-sitter";
3-
import type { SimpleScopeTypeType } from "@cursorless/common";
44
import type {
55
NodeMatcher,
66
NodeMatcherValue,
77
SelectionWithEditor,
88
} from "../typings/Types";
99
import { notSupported } from "../util/nodeMatchers";
1010
import { selectionWithEditorFromRange } from "../util/selectionUtils";
11-
import clojure from "./clojure";
12-
import type { LegacyLanguageId } from "./LegacyLanguageId";
1311
import latex from "./latex";
12+
import type { LegacyLanguageId } from "./LegacyLanguageId";
1413
import rust from "./rust";
1514

1615
export function getNodeMatcher(
@@ -41,7 +40,6 @@ export const languageMatchers: Record<
4140
LegacyLanguageId,
4241
Partial<Record<SimpleScopeTypeType, NodeMatcher>>
4342
> = {
44-
clojure,
4543
latex,
4644
rust,
4745
};

queries/clojure.scm

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,28 @@
8080
close: "}" @collectionItem.iteration.end.startOf
8181
) @collectionItem.iteration.domain
8282

83-
;;!! (hello)
84-
;;! ^^^^^^^
83+
;;!! (foo)
84+
;;! ^^^^^
8585
(
8686
(list_lit
8787
.
8888
value: (_) @functionCallee
89-
) @functionCall @functionCallee.domain
89+
) @functionCall @functionCallee.domain @argumentOrParameter.iteration
9090
;; A function call is a list literal which is not quoted
9191
(#not-parent-type? @functionCall quoting_lit)
9292
)
9393

94+
;;!! (foo :bar)
95+
;;! ^^^^
96+
(
97+
(list_lit
98+
.
99+
value: (_)
100+
value: (_) @argumentOrParameter
101+
) @_dummy
102+
(#not-parent-type? @_dummy quoting_lit)
103+
)
104+
94105
;;!! (defn foo [] 5)
95106
;;! ^^^^^^^^^^^^^^^
96107
;;! ^^^

0 commit comments

Comments
 (0)