Skip to content
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
4 changes: 4 additions & 0 deletions packages/cursorless-engine/src/languages/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const nodeMatchers: Partial<
itemNodeFinder("import_from_statement", "dotted_name", true),
argumentSelectionExtractor(),
),
matcher(
itemNodeFinder("import_statement", "dotted_name", false),
argumentSelectionExtractor(),
),
matcher(
itemNodeFinder("global_statement", "identifier"),
argumentSelectionExtractor(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
languageId: python
command:
version: 6
spokenForm: chuck item
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: import foo, baz
selections:
- anchor: {line: 0, character: 7}
active: {line: 0, character: 7}
marks: {}
finalState:
documentContents: import baz
selections:
- anchor: {line: 0, character: 7}
active: {line: 0, character: 7}