Skip to content

Remove jsx attribute from item scope #2039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/cursorless-engine/src/languages/getNodeMatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { LegacyLanguageId } from "./LegacyLanguageId";
import cpp from "./cpp";
import csharp from "./csharp";
import go from "./go";
import { patternMatchers as html } from "./html";
import java from "./java";
import latex from "./latex";
import markdown from "./markdown";
Expand Down Expand Up @@ -59,7 +58,6 @@ export const languageMatchers: Record<
csharp,
clojure,
go,
html,
java,
javascript: typescript,
javascriptreact: typescript,
Expand All @@ -73,7 +71,6 @@ export const languageMatchers: Record<
rust,
typescript,
typescriptreact: typescript,
xml: html,
};

function matcherIncludeSiblings(matcher: NodeMatcher): NodeMatcher {
Expand Down
11 changes: 0 additions & 11 deletions packages/cursorless-engine/src/languages/html.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

This file was deleted.

1 change: 0 additions & 1 deletion packages/cursorless-engine/src/languages/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { argumentMatcher, createPatternMatchers } from "../util/nodeMatchers";
const nodeMatchers: Partial<
Record<SimpleScopeTypeType, NodeMatcherAlternative>
> = {
collectionItem: "jsx_attribute",
argumentOrParameter: argumentMatcher("formal_parameters", "arguments"),
};

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
languageId: typescriptreact
command:
version: 6
spokenForm: change every item
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: everyScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: <div value={[1, 2]}>
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}
marks: {}
finalState:
documentContents: <div value={[, ]}>
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
languageId: typescriptreact
command:
version: 6
spokenForm: change item
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: <div value={[1, 2]}>
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}
marks: {}
finalState:
documentContents: <div value={[, 2]}>
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}

This file was deleted.

This file was deleted.