From 1f0062a3da58210ed22952cfbe331ee1855dbb7c Mon Sep 17 00:00:00 2001 From: Lloyd Date: Mon, 7 Jul 2025 01:02:26 +1000 Subject: [PATCH] Made merlinDiagnositcs default to true + fixed documentation (config.md) --- ocaml-lsp-server/docs/ocamllsp/config.md | 4 ++-- ocaml-lsp-server/src/config_data.ml | 4 ++-- ocaml-lsp-server/src/configuration.ml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ocaml-lsp-server/docs/ocamllsp/config.md b/ocaml-lsp-server/docs/ocamllsp/config.md index 2d9bfb2a6..663fabe26 100644 --- a/ocaml-lsp-server/docs/ocamllsp/config.md +++ b/ocaml-lsp-server/docs/ocamllsp/config.md @@ -23,11 +23,11 @@ interface config { codelens: { enable : boolean } /** - * Enable/Disable Dune diagnostics + * Enable/Disable Merlin (Dune) diagnostics * @default true * @since 1.18 */ - duneDiagnostics: { enable : boolean } + merlinDiagnostics: { enable : boolean } /** * Enable/Disable Inlay Hints diff --git a/ocaml-lsp-server/src/config_data.ml b/ocaml-lsp-server/src/config_data.ml index f034f27f2..93ce158c9 100644 --- a/ocaml-lsp-server/src/config_data.ml +++ b/ocaml-lsp-server/src/config_data.ml @@ -26,7 +26,7 @@ module SyntaxDocumentation = struct end module MerlinDiagnostics = struct - type t = { enable : bool [@default false] } + type t = { enable : bool [@default true] } [@@deriving yojson] [@@yojson.allow_extra_fields] end @@ -68,7 +68,7 @@ let default = ; hint_let_syntax_ppx = false } ; syntax_documentation = Some { enable = false } - ; merlin_diagnostics = Some { enable = false } + ; merlin_diagnostics = Some { enable = true } ; shorten_merlin_diagnostics = Some { enable = false } ; ppx_css_colors = Some { enable = true } } diff --git a/ocaml-lsp-server/src/configuration.ml b/ocaml-lsp-server/src/configuration.ml index b8b8a6f1f..58111e3df 100644 --- a/ocaml-lsp-server/src/configuration.ml +++ b/ocaml-lsp-server/src/configuration.ml @@ -65,8 +65,8 @@ let update t { DidChangeConfigurationParams.settings } = let display_merlin_diagnostics t = match t.data.merlin_diagnostics with - | Some { enable = true } -> true - | Some { enable = false } | None -> false + | Some { enable = true } | None -> true + | Some { enable = false } -> false ;; let shorten_merlin_diagnostics t =