forked from ocaml/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
$ cat >test.ml <<'EOF' | ||
> let f x ~lbl_a y ~lbl_b z = ignore (x, lbl_a, lbl_b, z) | ||
> let _ = f | ||
> EOF | ||
|
||
First is the first parameter: | ||
$ $MERLIN single signature-help -position 2:11 -filename test <test.ml | | ||
> jq '.value.activeParameter' | ||
0 | ||
|
||
$ cat >test.ml <<'EOF' | ||
> let f x ~lbl_a y ~lbl_b z = ignore (x, lbl_a, lbl_b, z) | ||
> let _ = f 0 | ||
> EOF | ||
|
||
FIXME: After we expect the next non-labelled parameter to be active: | ||
$ $MERLIN single signature-help -position 2:12 -filename test <test.ml | | ||
> jq '.value.activeParameter' | ||
0 | ||
|
||
$ cat >test.ml <<'EOF' | ||
> let f x ~lbl_a y ~lbl_b z = ignore (x, lbl_a, lbl_b, z) | ||
> let _ = f 0 3 | ||
> EOF | ||
|
||
It does happen when the expression is being writter: | ||
$ $MERLIN single signature-help -position 2:12 -filename test <test.ml | | ||
> jq '.value.activeParameter' | ||
2 | ||
|
||
$ cat >test.ml <<'EOF' | ||
> let f x ~lbl_a y ~lbl_b z = ignore (x, lbl_a, lbl_b, z) | ||
> let _ = f 0 ~ | ||
> EOF | ||
|
||
And when a tilde is used the first labelled arg is higlighted: | ||
$ $MERLIN single signature-help -position 2:13 -filename test <test.ml | | ||
> jq '.value.activeParameter' | ||
1 | ||
|
||
$ cat >test.ml <<'EOF' | ||
> let f x ~lbl_a y ~lbl_b z = ignore (x, lbl_a, lbl_b, z) | ||
> let _ = f 0 ~lbl_b | ||
> EOF | ||
|
||
Or the second one is the name corresponds: | ||
$ $MERLIN single signature-help -position 2:18 -filename test <test.ml | | ||
> jq '.value.activeParameter' | ||
3 |
File renamed without changes.