File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
tests/test-dirs/signature-help Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -1068,8 +1068,11 @@ let dispatch pipeline (type a) : a Query_protocol.t -> a = function
10681068 in
10691069 match application_signature with
10701070 | Some s ->
1071+ (* The signature help should not appear on the name of the function. *)
10711072 if Msource. compare_position source position s.function_position < 0 then
10721073 None
1074+ (* The signature help should not appear after the last parameter. *)
1075+ else if s.active_param = None then None
10731076 else
10741077 let prefix =
10751078 let fun_name = Option. value ~default: " _" s.function_name in
Original file line number Diff line number Diff line change 1+ $ $ MERLIN single signature-help -position 2 : 14 << EOF
2+ > let f x y z = x + y + z
3+ > let a = f 4 4
4+ > EOF
5+ {
6+ " class" : " return" ,
7+ " value" : {
8+ " signatures" : [
9+ {
10+ " label" : " f : int -> int -> int -> int" ,
11+ " parameters" : [
12+ {
13+ " label" : [
14+ 4 ,
15+ 7
16+ ]
17+ },
18+ {
19+ " label" : [
20+ 11 ,
21+ 14
22+ ]
23+ },
24+ {
25+ " label" : [
26+ 18 ,
27+ 21
28+ ]
29+ }
30+ ]
31+ }
32+ ],
33+ " activeParameter" : 2 ,
34+ " activeSignature" : 0
35+ },
36+ " notifications" : []
37+ }
38+
39+ $ $ MERLIN single signature-help -position 2 : 16 << EOF
40+ > let f x y z = x + y + z
41+ > let a = f 4 4 4
42+ > EOF
43+ {
44+ " class" : " return" ,
45+ " value" : {},
46+ " notifications" : []
47+ }
You can’t perform that action at this time.
0 commit comments