File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module InlayHints = struct
55 type t =
66 { hint_pattern_variables : bool [@ key "hintPatternVariables" ] [@ default false ]
77 ; hint_let_bindings : bool [@ key "hintLetBindings" ] [@ default false ]
8- ; hint_function_params : bool [@ key "hintFunctionParams" ] [@ default false ]
8+ ; hint_function_params : bool [@ key "hintFunctionParams" ] [@ default true ]
99 }
1010 [@@ deriving_inline yojson ] [@@ yojson.allow_extra_fields]
1111
@@ -81,7 +81,7 @@ module InlayHints = struct
8181 | Ppx_yojson_conv_lib.Option. Some v -> v)
8282 ; hint_function_params =
8383 (match hint_function_params_value with
84- | Ppx_yojson_conv_lib.Option. None -> false
84+ | Ppx_yojson_conv_lib.Option. None -> true
8585 | Ppx_yojson_conv_lib.Option. Some v -> v)
8686 }))
8787 | _ as yojson ->
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ let apply_inlay_hints
55 ?range
66 ?(hint_pattern_variables = false )
77 ?(hint_let_bindings = false )
8- ?( hint_function_params = true )
8+ ?hint_function_params
99 ~source
1010 ()
1111 =
@@ -25,18 +25,19 @@ let apply_inlay_hints
2525 let textDocument = TextDocumentIdentifier. create ~uri in
2626 InlayHintParams. create ~text Document ~range ()
2727 in
28+ let regular_config =
29+ [ " hintPatternVariables" , `Bool hint_pattern_variables
30+ ; " hintLetBindings" , `Bool hint_let_bindings
31+ ]
32+ @
33+ match hint_function_params with
34+ | None -> []
35+ | Some hint_function_params -> [ " hintFunctionParams" , `Bool hint_function_params ]
36+ in
2837 let inlay_hints =
2938 Test. run_request
3039 ~prep: (fun client -> Test. openDocument ~client ~uri ~source )
31- ~settings:
32- (`Assoc
33- [ ( " inlayHints"
34- , `Assoc
35- [ " hintPatternVariables" , `Bool hint_pattern_variables
36- ; " hintLetBindings" , `Bool hint_let_bindings
37- ; " hintFunctionParams" , `Bool hint_function_params
38- ] )
39- ])
40+ ~settings: (`Assoc [ " inlayHints" , `Assoc regular_config ])
4041 (InlayHint request)
4142 in
4243 match inlay_hints with
You can’t perform that action at this time.
0 commit comments