diff --git a/ocaml-lsp-server/src/config_data.ml b/ocaml-lsp-server/src/config_data.ml index 7a860336a..c67b315c1 100644 --- a/ocaml-lsp-server/src/config_data.ml +++ b/ocaml-lsp-server/src/config_data.ml @@ -389,80 +389,6 @@ module SyntaxDocumentation = struct [@@@end] end -module SyntaxDocumentation = struct - type t = { enable : bool [@default false] } - [@@deriving_inline yojson] [@@yojson.allow_extra_fields] - - let _ = fun (_ : t) -> () - - let t_of_yojson = - (let _tp_loc = - "ocaml-lsp-server/src/config_data.ml.SyntaxDocumentation.t" - in - function - | `Assoc field_yojsons as yojson -> ( - let enable_field = ref Ppx_yojson_conv_lib.Option.None - and duplicates = ref [] - and extra = ref [] in - let rec iter = function - | (field_name, _field_yojson) :: tail -> - (match field_name with - | "enable" -> ( - match Ppx_yojson_conv_lib.( ! ) enable_field with - | Ppx_yojson_conv_lib.Option.None -> - let fvalue = bool_of_yojson _field_yojson in - enable_field := Ppx_yojson_conv_lib.Option.Some fvalue - | Ppx_yojson_conv_lib.Option.Some _ -> - duplicates := field_name :: Ppx_yojson_conv_lib.( ! ) duplicates) - | _ -> ()); - iter tail - | [] -> () - in - iter field_yojsons; - match Ppx_yojson_conv_lib.( ! ) duplicates with - | _ :: _ -> - Ppx_yojson_conv_lib.Yojson_conv_error.record_duplicate_fields - _tp_loc - (Ppx_yojson_conv_lib.( ! ) duplicates) - yojson - | [] -> ( - match Ppx_yojson_conv_lib.( ! ) extra with - | _ :: _ -> - Ppx_yojson_conv_lib.Yojson_conv_error.record_extra_fields - _tp_loc - (Ppx_yojson_conv_lib.( ! ) extra) - yojson - | [] -> - let enable_value = Ppx_yojson_conv_lib.( ! ) enable_field in - { enable = - (match enable_value with - | Ppx_yojson_conv_lib.Option.None -> false - | Ppx_yojson_conv_lib.Option.Some v -> v) - })) - | _ as yojson -> - Ppx_yojson_conv_lib.Yojson_conv_error.record_list_instead_atom - _tp_loc - yojson - : Ppx_yojson_conv_lib.Yojson.Safe.t -> t) - - let _ = t_of_yojson - - let yojson_of_t = - (function - | { enable = v_enable } -> - let bnds : (string * Ppx_yojson_conv_lib.Yojson.Safe.t) list = [] in - let bnds = - let arg = yojson_of_bool v_enable in - ("enable", arg) :: bnds - in - `Assoc bnds - : t -> Ppx_yojson_conv_lib.Yojson.Safe.t) - - let _ = yojson_of_t - - [@@@end] -end - type t = { codelens : Lens.t Json.Nullable_option.t [@default None] [@yojson_drop_default ( = )]