diff --git a/.ocamlformat b/.ocamlformat index 10492f340e..409672b79c 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,4 +1,4 @@ -version=0.26.2 +version=0.27.0 disable=false break-cases=fit-or-vertical @@ -8,4 +8,4 @@ dock-collection-brackets=false # Preserve begin/end exp-grouping=preserve module-item-spacing=preserve -parse-docstrings=false \ No newline at end of file +parse-docstrings=false diff --git a/src/analysis/completion.ml b/src/analysis/completion.ml index 9e8753589b..2543b8052d 100644 --- a/src/analysis/completion.ml +++ b/src/analysis/completion.ml @@ -507,7 +507,10 @@ let complete_methods ~env ~prefix obj = in let methods = List.filter ~f:has_prefix (methods_of_type env t) in List.map methods ~f:(fun (name, ty) -> - let info = `None (* TODO: get documentation. *) in + let info = + `None + (* TODO: get documentation. *) + in { name; kind = `MethodCall; desc = `Type_scheme ty; diff --git a/src/analysis/destruct.ml b/src/analysis/destruct.ml index 3b17c2d56f..e45bb5ca01 100644 --- a/src/analysis/destruct.ml +++ b/src/analysis/destruct.ml @@ -199,8 +199,8 @@ let rec needs_parentheses = function binding. *) | Texp_function (_, Tfunction_body _) (* The assumption here is that we're not in a [function ... | ...] - situation but either in [fun param] or [let name param]. *) -> - needs_parentheses ts + situation but either in [fun param] or [let name param]. *) + -> needs_parentheses ts | _ -> true end | _ -> needs_parentheses ts) diff --git a/src/analysis/locate.ml b/src/analysis/locate.ml index 329c8343ae..a91e37b4a6 100644 --- a/src/analysis/locate.ml +++ b/src/analysis/locate.ml @@ -794,7 +794,8 @@ let doc_from_uid ~config ~loc uid = when Env.get_current_unit_name () <> comp_unit -> log ~title:"get_doc" "the doc (%a) you're looking for is in another\n\ - \ compilation unit (%s)" Logger.fmt + \ compilation unit (%s)" + Logger.fmt (fun fmt -> Shape.Uid.print fmt uid) comp_unit; log ~title:"doc_from_uid" "Loading the cmt for unit %S" comp_unit; diff --git a/src/analysis/syntax_doc.ml b/src/analysis/syntax_doc.ml index 30f7650c66..6fbe07e317 100644 --- a/src/analysis/syntax_doc.ml +++ b/src/analysis/syntax_doc.ml @@ -46,7 +46,7 @@ let get_syntax_doc cursor_loc node : syntax_info = :: ( _, Module_type_constraint (Tmodtype_explicit - { mty_desc = Tmty_with (_, [ (_, _, Twith_modtype _) ]); _ }) ) + { mty_desc = Tmty_with (_, [ (_, _, Twith_modtype _) ]); _ }) ) :: _ -> Some { name = "Module substitution"; diff --git a/src/frontend/ocamlmerlin/old/old_protocol.ml b/src/frontend/ocamlmerlin/old/old_protocol.ml index 9ca6b50a62..8096cd1386 100644 --- a/src/frontend/ocamlmerlin/old/old_protocol.ml +++ b/src/frontend/ocamlmerlin/old/old_protocol.ml @@ -73,8 +73,8 @@ type _ sync_command = | Checkout : Context.document -> unit sync_command | Idle_job : bool sync_command | Flags_get : string list sync_command - | Project_get - : (string list * [ `Ok | `Failures of string list ]) sync_command + | Project_get : + (string list * [ `Ok | `Failures of string list ]) sync_command type 'a command = Query of 'a Query_protocol.t | Sync of 'a sync_command diff --git a/src/kernel/mconfig.ml b/src/kernel/mconfig.ml index fe35c6370a..76593b8266 100644 --- a/src/kernel/mconfig.ml +++ b/src/kernel/mconfig.ml @@ -614,13 +614,15 @@ let ocaml_flags = \ a single warning number\n\ \ .. a range of consecutive warning numbers\n\ \ a predefined set\n\ - \ default setting is %S" Warnings.defaults_w ); + \ default setting is %S" + Warnings.defaults_w ); ( "-warn-error", ocaml_warnings_spec ~error:true, Printf.sprintf " Enable or disable error status for warnings according\n\ \ to . See option -w for the syntax of .\n\ - \ Default setting is %S" Warnings.defaults_warn_error ); + \ Default setting is %S" + Warnings.defaults_warn_error ); ( "-alert", ocaml_alert_spec, Printf.sprintf diff --git a/src/kernel/mreader.ml b/src/kernel/mreader.ml index bec0e36a7c..d84839d3f4 100644 --- a/src/kernel/mreader.ml +++ b/src/kernel/mreader.ml @@ -177,7 +177,10 @@ let parse ?for_completion config = function with | Some (`No_labels no_labels_for_completion, parsetree) -> let lexer_errors, parser_errors, comments = ([], [], []) in - let lexer_keywords = [] (* TODO? *) in + let lexer_keywords = + [] + (* TODO? *) + in { lexer_keywords; lexer_errors; parser_errors;