Skip to content

Commit

Permalink
send notifications for setting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PizieDust committed Dec 25, 2023
1 parent 8792868 commit 3862af9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src-bindings/vscode_languageclient/vscode_languageclient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
3 changes: 3 additions & 0 deletions src-bindings/vscode_languageclient/vscode_languageclient.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion src/vscode_ocaml_platform.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 3862af9

Please sign in to comment.