File tree Expand file tree Collapse file tree 2 files changed +4
-30
lines changed
tests/test-dirs/signature-help Expand file tree Collapse file tree 2 files changed +4
-30
lines changed Original file line number Diff line number Diff line change @@ -956,8 +956,11 @@ let dispatch pipeline (type a) : a Query_protocol.t -> a = function
956956 in
957957 match application_signature with
958958 | Some s ->
959+ (* The signature help should not appear on the name of the function. *)
959960 if Msource. compare_position source position s.function_position < 0 then
960961 None
962+ (* The signature help should not appear after the last parameter. *)
963+ else if s.active_param = None then None
961964 else
962965 let prefix =
963966 let fun_name = Option. value ~default: " _" s.function_name in
Original file line number Diff line number Diff line change 3636 " notifications" : []
3737 }
3838
39- FIXME: Once the function has all of its parameters , it should not loop again on the parameters
4039 $ $ MERLIN single signature-help -position 2 : 16 << EOF
4140 > let f x y z = x + y + z
4241 > let a = f 4 4 4
4342 > EOF
4443 {
4544 " class" : " return" ,
46- " value" : {
47- " signatures" : [
48- {
49- " label" : " f : int -> int -> int -> int" ,
50- " parameters" : [
51- {
52- " label" : [
53- 4 ,
54- 7
55- ]
56- },
57- {
58- " label" : [
59- 11 ,
60- 14
61- ]
62- },
63- {
64- " label" : [
65- 18 ,
66- 21
67- ]
68- }
69- ]
70- }
71- ],
72- " activeParameter" : 0 ,
73- " activeSignature" : 0
74- },
45+ " value" : {},
7546 " notifications" : []
7647 }
You can’t perform that action at this time.
0 commit comments