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.
Prioritize non-ghost nodes when looking for best node. (ocaml#1664)
from voodoos/issue1660 Fixes ocaml#1660
- Loading branch information
Showing
4 changed files
with
44 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
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
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
(cram | ||
(applies_to :whole_subtree) | ||
(locks ../server-tests/merlin_server)) | ||
|
||
(cram | ||
(applies_to issue1660-deriving-compare) | ||
(enabled_if (= %{env:MERLIN_TESTS=default} all))) |
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,36 @@ | ||
$ cat >dune-project <<EOF | ||
> (lang dune 2.0) | ||
> EOF | ||
|
||
$ cat >main.ml <<EOF | ||
> module M = struct | ||
> type t = | ||
> | Foo | ||
> | Bar | ||
> end | ||
> EOF | ||
|
||
$ $MERLIN single type-enclosing -position 2:7 \ | ||
> -filename main.ml < main.ml | jq '.value[0].type' | ||
"type t = Foo | Bar" | ||
|
||
|
||
$ cat >main.ml <<EOF | ||
> module M = struct | ||
> type t = | ||
> | Foo | ||
> | Bar | ||
> [@@deriving compare] | ||
> end | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> (library | ||
> (name main) | ||
> (preprocess (pps ppx_compare))) | ||
|
||
$ dune build | ||
|
||
$ $MERLIN single type-enclosing -position 2:7 \ | ||
> -filename main.ml < main.ml | jq '.value[0].type' | ||
"type t =o | Bar" |