Skip to content

Commit d54e8e5

Browse files
authored
Chore: promote @lint results (#1420)
1 parent 93d9d65 commit d54e8e5

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

ocaml-lsp-server/src/config_data.ml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -507,17 +507,6 @@ let t_of_yojson =
507507
extended_hover_field := Ppx_yojson_conv_lib.Option.Some fvalue
508508
| Ppx_yojson_conv_lib.Option.Some _ ->
509509
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
510-
| "syntaxDocumentation" ->
511-
(match Ppx_yojson_conv_lib.( ! ) syntax_documentation_field with
512-
| Ppx_yojson_conv_lib.Option.None ->
513-
let fvalue =
514-
Json.Nullable_option.t_of_yojson
515-
SyntaxDocumentation.t_of_yojson
516-
_field_yojson
517-
in
518-
syntax_documentation_field := Ppx_yojson_conv_lib.Option.Some fvalue
519-
| Ppx_yojson_conv_lib.Option.Some _ ->
520-
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
521510
| "inlayHints" ->
522511
(match Ppx_yojson_conv_lib.( ! ) inlay_hints_field with
523512
| Ppx_yojson_conv_lib.Option.None ->
@@ -538,6 +527,17 @@ let t_of_yojson =
538527
dune_diagnostics_field := Ppx_yojson_conv_lib.Option.Some fvalue
539528
| Ppx_yojson_conv_lib.Option.Some _ ->
540529
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
530+
| "syntaxDocumentation" ->
531+
(match Ppx_yojson_conv_lib.( ! ) syntax_documentation_field with
532+
| Ppx_yojson_conv_lib.Option.None ->
533+
let fvalue =
534+
Json.Nullable_option.t_of_yojson
535+
SyntaxDocumentation.t_of_yojson
536+
_field_yojson
537+
in
538+
syntax_documentation_field := Ppx_yojson_conv_lib.Option.Some fvalue
539+
| Ppx_yojson_conv_lib.Option.Some _ ->
540+
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
541541
| "merlinJumpCodeActions" ->
542542
(match Ppx_yojson_conv_lib.( ! ) merlin_jump_code_actions_field with
543543
| Ppx_yojson_conv_lib.Option.None ->
@@ -625,35 +625,46 @@ let yojson_of_t =
625625
} ->
626626
let bnds : (string * Ppx_yojson_conv_lib.Yojson.Safe.t) list = [] in
627627
let bnds =
628-
if None = v_dune_diagnostics
628+
if None = v_merlin_jump_code_actions
629629
then bnds
630630
else (
631631
let arg =
632-
(Json.Nullable_option.yojson_of_t DuneDiagnostics.yojson_of_t)
633-
v_dune_diagnostics
632+
(Json.Nullable_option.yojson_of_t MerlinJumpCodeActions.yojson_of_t)
633+
v_merlin_jump_code_actions
634634
in
635-
let bnd = "duneDiagnostics", arg in
635+
let bnd = "merlinJumpCodeActions", arg in
636636
bnd :: bnds)
637637
in
638638
let bnds =
639-
if None = v_inlay_hints
639+
if None = v_syntax_documentation
640640
then bnds
641641
else (
642642
let arg =
643-
(Json.Nullable_option.yojson_of_t InlayHints.yojson_of_t) v_inlay_hints
643+
(Json.Nullable_option.yojson_of_t SyntaxDocumentation.yojson_of_t)
644+
v_syntax_documentation
644645
in
645-
let bnd = "inlayHints", arg in
646+
let bnd = "syntaxDocumentation", arg in
646647
bnd :: bnds)
647648
in
648649
let bnds =
649-
if None = v_syntax_documentation
650+
if None = v_dune_diagnostics
650651
then bnds
651652
else (
652653
let arg =
653-
(Json.Nullable_option.yojson_of_t SyntaxDocumentation.yojson_of_t)
654-
v_syntax_documentation
654+
(Json.Nullable_option.yojson_of_t DuneDiagnostics.yojson_of_t)
655+
v_dune_diagnostics
655656
in
656-
let bnd = "syntaxDocumentation", arg in
657+
let bnd = "duneDiagnostics", arg in
658+
bnd :: bnds)
659+
in
660+
let bnds =
661+
if None = v_inlay_hints
662+
then bnds
663+
else (
664+
let arg =
665+
(Json.Nullable_option.yojson_of_t InlayHints.yojson_of_t) v_inlay_hints
666+
in
667+
let bnd = "inlayHints", arg in
657668
bnd :: bnds)
658669
in
659670
let bnds =
@@ -674,17 +685,6 @@ let yojson_of_t =
674685
let bnd = "codelens", arg in
675686
bnd :: bnds)
676687
in
677-
let bnds =
678-
if None = v_merlin_jump_code_actions
679-
then bnds
680-
else (
681-
let arg =
682-
(Json.Nullable_option.yojson_of_t MerlinJumpCodeActions.yojson_of_t)
683-
v_merlin_jump_code_actions
684-
in
685-
let bnd = "merlinJumpCodeActions", arg in
686-
bnd :: bnds)
687-
in
688688
`Assoc bnds
689689
: t -> Ppx_yojson_conv_lib.Yojson.Safe.t)
690690
;;

ocaml-lsp-server/src/custom_requests/req_hover_extended.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ module Request_params = struct
1414
}
1515
[@@deriving_inline yojson] [@@yojson.allow_extra_fields]
1616

17-
let create ?verbosity ~text_document ~cursor_position () =
18-
{ text_document; cursor_position; verbosity }
19-
;;
20-
2117
let _ = fun (_ : t) -> ()
2218

2319
let t_of_yojson =
@@ -142,6 +138,10 @@ module Request_params = struct
142138

143139
[@@@end]
144140

141+
let create ?verbosity ~text_document ~cursor_position () =
142+
{ text_document; cursor_position; verbosity }
143+
;;
144+
145145
let params_schema =
146146
`Assoc
147147
[ "textDocument", `String "<TextDocumentIdentifier>"

0 commit comments

Comments
 (0)