Skip to content

Commit

Permalink
Chore: promote @lint results
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Dec 11, 2024
1 parent 93d9d65 commit 7feda6d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
66 changes: 33 additions & 33 deletions ocaml-lsp-server/src/config_data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -507,17 +507,6 @@ let t_of_yojson =
extended_hover_field := Ppx_yojson_conv_lib.Option.Some fvalue
| Ppx_yojson_conv_lib.Option.Some _ ->
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
| "syntaxDocumentation" ->
(match Ppx_yojson_conv_lib.( ! ) syntax_documentation_field with
| Ppx_yojson_conv_lib.Option.None ->
let fvalue =
Json.Nullable_option.t_of_yojson
SyntaxDocumentation.t_of_yojson
_field_yojson
in
syntax_documentation_field := Ppx_yojson_conv_lib.Option.Some fvalue
| Ppx_yojson_conv_lib.Option.Some _ ->
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
| "inlayHints" ->
(match Ppx_yojson_conv_lib.( ! ) inlay_hints_field with
| Ppx_yojson_conv_lib.Option.None ->
Expand All @@ -538,6 +527,17 @@ let t_of_yojson =
dune_diagnostics_field := Ppx_yojson_conv_lib.Option.Some fvalue
| Ppx_yojson_conv_lib.Option.Some _ ->
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
| "syntaxDocumentation" ->
(match Ppx_yojson_conv_lib.( ! ) syntax_documentation_field with
| Ppx_yojson_conv_lib.Option.None ->
let fvalue =
Json.Nullable_option.t_of_yojson
SyntaxDocumentation.t_of_yojson
_field_yojson
in
syntax_documentation_field := Ppx_yojson_conv_lib.Option.Some fvalue
| Ppx_yojson_conv_lib.Option.Some _ ->
duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates)
| "merlinJumpCodeActions" ->
(match Ppx_yojson_conv_lib.( ! ) merlin_jump_code_actions_field with
| Ppx_yojson_conv_lib.Option.None ->
Expand Down Expand Up @@ -625,35 +625,46 @@ let yojson_of_t =
} ->
let bnds : (string * Ppx_yojson_conv_lib.Yojson.Safe.t) list = [] in
let bnds =
if None = v_dune_diagnostics
if None = v_merlin_jump_code_actions
then bnds
else (
let arg =
(Json.Nullable_option.yojson_of_t DuneDiagnostics.yojson_of_t)
v_dune_diagnostics
(Json.Nullable_option.yojson_of_t MerlinJumpCodeActions.yojson_of_t)
v_merlin_jump_code_actions
in
let bnd = "duneDiagnostics", arg in
let bnd = "merlinJumpCodeActions", arg in
bnd :: bnds)
in
let bnds =
if None = v_inlay_hints
if None = v_syntax_documentation
then bnds
else (
let arg =
(Json.Nullable_option.yojson_of_t InlayHints.yojson_of_t) v_inlay_hints
(Json.Nullable_option.yojson_of_t SyntaxDocumentation.yojson_of_t)
v_syntax_documentation
in
let bnd = "inlayHints", arg in
let bnd = "syntaxDocumentation", arg in
bnd :: bnds)
in
let bnds =
if None = v_syntax_documentation
if None = v_dune_diagnostics
then bnds
else (
let arg =
(Json.Nullable_option.yojson_of_t SyntaxDocumentation.yojson_of_t)
v_syntax_documentation
(Json.Nullable_option.yojson_of_t DuneDiagnostics.yojson_of_t)
v_dune_diagnostics
in
let bnd = "syntaxDocumentation", arg in
let bnd = "duneDiagnostics", arg in
bnd :: bnds)
in
let bnds =
if None = v_inlay_hints
then bnds
else (
let arg =
(Json.Nullable_option.yojson_of_t InlayHints.yojson_of_t) v_inlay_hints
in
let bnd = "inlayHints", arg in
bnd :: bnds)
in
let bnds =
Expand All @@ -674,17 +685,6 @@ let yojson_of_t =
let bnd = "codelens", arg in
bnd :: bnds)
in
let bnds =
if None = v_merlin_jump_code_actions
then bnds
else (
let arg =
(Json.Nullable_option.yojson_of_t MerlinJumpCodeActions.yojson_of_t)
v_merlin_jump_code_actions
in
let bnd = "merlinJumpCodeActions", arg in
bnd :: bnds)
in
`Assoc bnds
: t -> Ppx_yojson_conv_lib.Yojson.Safe.t)
;;
Expand Down
8 changes: 4 additions & 4 deletions ocaml-lsp-server/src/custom_requests/req_hover_extended.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ module Request_params = struct
}
[@@deriving_inline yojson] [@@yojson.allow_extra_fields]

let create ?verbosity ~text_document ~cursor_position () =
{ text_document; cursor_position; verbosity }
;;

let _ = fun (_ : t) -> ()

let t_of_yojson =
Expand Down Expand Up @@ -142,6 +138,10 @@ module Request_params = struct

[@@@end]

let create ?verbosity ~text_document ~cursor_position () =
{ text_document; cursor_position; verbosity }
;;

let params_schema =
`Assoc
[ "textDocument", `String "<TextDocumentIdentifier>"
Expand Down

0 comments on commit 7feda6d

Please sign in to comment.