Skip to content

Commit 166bca7

Browse files
zthcknitt
authored andcommitted
get CodeLens to a good enough state
1 parent aea019b commit 166bca7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

analysis/src/Hint.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ let codeLens ~path ~debug =
125125
(match vb with
126126
| {
127127
pvb_pat = {ppat_desc = Ppat_var _; ppat_loc};
128-
pvb_expr = {pexp_desc = Pexp_fun _};
128+
pvb_expr =
129+
{
130+
pexp_desc =
131+
Pexp_construct
132+
({txt = Lident "Function$"}, Some {pexp_desc = Pexp_fun _});
133+
};
129134
} ->
130135
push ppat_loc
131136
| _ -> ());

analysis/tests/src/expected/CodeLens.res.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
Code Lens src/CodeLens.res
2+
miss, not a function
3+
Pexp_ident:Completion.ff
24
[{
3-
"range": {"start": {"line": 9, "character": 4}, "end": {"line": 9, "character": 8}},
4-
"command": {"title": "{\"name\": string} => React.element", "command": ""}
5-
}, {
65
"range": {"start": {"line": 4, "character": 4}, "end": {"line": 4, "character": 6}},
76
"command": {"title": "(~opt1: int=?, ~a: int, ~b: int, unit, ~opt2: int=?, unit, ~c: int) => int", "command": ""}
87
}, {

0 commit comments

Comments
 (0)