Skip to content

Commit

Permalink
Fix call argument handling and support inherit keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
fidgetingbits committed Nov 3, 2023
1 parent 7136a10 commit 9ea7601
Show file tree
Hide file tree
Showing 16 changed files with 569 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
languageId: nix
command:
version: 6
spokenForm: change arg
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
{
outputs = { self, nixpkgs, home-manager }:
"foo"
}
selections:
- anchor: {line: 1, character: 13}
active: {line: 1, character: 13}
marks: {}
finalState:
documentContents: |-
{
outputs = :
"foo"
}
selections:
- anchor: {line: 1, character: 12}
active: {line: 1, character: 12}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change arg
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 35}
active: {line: 1, character: 35}
marks: {}
finalState:
documentContents: |
{
exampleHost = mkFunc "a" "b" d e;
}
selections:
- anchor: {line: 1, character: 33}
active: {line: 1, character: 33}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change arg
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a";
}
selections:
- anchor: {line: 1, character: 26}
active: {line: 1, character: 26}
marks: {}
finalState:
documentContents: |
{
exampleHost = mkFunc ;
}
selections:
- anchor: {line: 1, character: 25}
active: {line: 1, character: 25}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
languageId: nix
command:
version: 6
spokenForm: change arg pit
action:
name: clearAndSetSelection
target:
type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: p}
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
inherit pkgs input output;
}
selections:
- anchor: {line: 1, character: 17}
active: {line: 1, character: 17}
marks:
default.p:
start: {line: 1, character: 10}
end: {line: 1, character: 14}
finalState:
documentContents: |
{
inherit input output;
}
selections:
- anchor: {line: 1, character: 10}
active: {line: 1, character: 10}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change call
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCall}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 25}
active: {line: 1, character: 25}
marks: {}
finalState:
documentContents: |
{
exampleHost = ;
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 28}
active: {line: 1, character: 28}
marks: {}
finalState:
documentContents: |
{
exampleHost = "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 32}
active: {line: 1, character: 32}
marks: {}
finalState:
documentContents: |
{
exampleHost = "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 36}
active: {line: 1, character: 36}
marks: {}
finalState:
documentContents: |
{
exampleHost = "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 38}
active: {line: 1, character: 38}
marks: {}
finalState:
documentContents: |
{
exampleHost = "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 40}
active: {line: 1, character: 40}
marks: {}
finalState:
documentContents: |
{
exampleHost = "a" "b" "c" d e;
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
exampleHost = mkFunc "a";
}
selections:
- anchor: {line: 1, character: 26}
active: {line: 1, character: 26}
marks: {}
finalState:
documentContents: |
{
exampleHost = "a";
}
selections:
- anchor: {line: 1, character: 18}
active: {line: 1, character: 18}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: nix
command:
version: 6
spokenForm: change callee
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |
{
inherit pkgs input output;
}
selections:
- anchor: {line: 1, character: 17}
active: {line: 1, character: 17}
marks: {}
finalState:
documentContents: |
{
pkgs input output;
}
selections:
- anchor: {line: 1, character: 2}
active: {line: 1, character: 2}
Loading

0 comments on commit 9ea7601

Please sign in to comment.