diff --git a/src-bindings/vscode_languageclient/vscode_languageclient.ml b/src-bindings/vscode_languageclient/vscode_languageclient.ml index 97b876e9a..b2c23d419 100644 --- a/src-bindings/vscode_languageclient/vscode_languageclient.ml +++ b/src-bindings/vscode_languageclient/vscode_languageclient.ml @@ -97,9 +97,12 @@ module OcamllspSettings = struct val extendedHover : t -> OcamllspSettingEnable.t or_undefined [@@js.get] + val syntaxDocumentation : t -> OcamllspSettingEnable.t or_undefined [@@js.get] + val create : ?codelens:OcamllspSettingEnable.t -> ?extendedHover:OcamllspSettingEnable.t + -> ?syntaxDocumentation:OcamllspSettingEnable.t -> unit -> t [@@js.builder]] diff --git a/src-bindings/vscode_languageclient/vscode_languageclient.mli b/src-bindings/vscode_languageclient/vscode_languageclient.mli index 591687e13..35821cedf 100644 --- a/src-bindings/vscode_languageclient/vscode_languageclient.mli +++ b/src-bindings/vscode_languageclient/vscode_languageclient.mli @@ -78,9 +78,12 @@ module OcamllspSettings : sig val extendedHover : t -> OcamllspSettingEnable.t option + val syntaxDocumentation : t -> OcamllspSettingEnable.t option + val create : ?codelens:OcamllspSettingEnable.t -> ?extendedHover:OcamllspSettingEnable.t + -> ?syntaxDocumentation:OcamllspSettingEnable.t -> unit -> t end diff --git a/src/vscode_ocaml_platform.ml b/src/vscode_ocaml_platform.ml index c6efcee95..4cc2116f6 100644 --- a/src/vscode_ocaml_platform.ml +++ b/src/vscode_ocaml_platform.ml @@ -38,8 +38,14 @@ let notify_configuration_changes instance = ~f:(fun enable -> LanguageClient.OcamllspSettingEnable.create ~enable ()) in + let syntaxDocumentation = + Option.map + Settings.(get server_syntaxDocumentation_setting) + ~f:(fun enable -> + LanguageClient.OcamllspSettingEnable.create ~enable ()) + in let settings = - LanguageClient.OcamllspSettings.create ?codelens ?extendedHover () + LanguageClient.OcamllspSettings.create ?codelens ?extendedHover ?syntaxDocumentation () in let payload = let settings =