Skip to content

Commit

Permalink
Clojure scope migration (#2337)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored May 30, 2024
1 parent a497f63 commit e2ee82a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/cursorless-engine/src/languages/clojure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ const ifStatementMatcher = matcher(ifStatementFinder);
const nodeMatchers: Partial<
Record<SimpleScopeTypeType, NodeMatcherAlternative>
> = {
map: "map_lit",

collectionKey: matcher(mapParityNodeFinder(0)),
collectionItem: cascadingMatcher(
// Treat each key value pair as a single item if we're in a map
Expand All @@ -160,9 +158,6 @@ const nodeMatchers: Partial<
),
),

// A list is either a vector literal or a quoted list literal
list: ["vec_lit", "quoting_lit.list_lit"],

functionCall: functionCallPattern,
functionCallee: chainedMatcher([
functionCallFinder,
Expand Down
8 changes: 8 additions & 0 deletions queries/clojure.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
(comment) @comment @textFragment

(str_lit) @string @textFragment

(map_lit) @map

;; A list is either a vector literal or a quoted list literal
(vec_lit) @list
(quoting_lit
(list_lit)
) @list

0 comments on commit e2ee82a

Please sign in to comment.