这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ possible and does not make any assumptions about IO.
(ocamlformat-rpc-lib (>= 0.21.0))
(odoc :with-doc)
(odoc-parser (= 2.0.0))
(merlin-lib (= "5.2.1-502+jst"))
(merlin-lib (= "5.2.1-502+ox"))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This corresponds to the published version on the OxCaml opam-repository, but there might be some broader changes needed to support that

ppx_yojson_conv
core_unix
async
Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server.opam
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ depends: [
"ocamlformat-rpc-lib" {>= "0.21.0"}
"odoc" {with-doc}
"odoc-parser" {= "2.0.0"}
"merlin-lib" {= "5.2.1-502+jst"}
"merlin-lib" {= "5.2.1-502+ox"}
"ppx_yojson_conv"
"core_unix"
"async"
Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server/src/config_data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration of this setting isn't possible in many LSP clients (e.g. the ocaml-platform VS Code extension), and defaulting to true seems to match the previous behaviour. I guess the false default might make sense in the JS internal toolchain

; shorten_merlin_diagnostics = Some { enable = false }
; ppx_css_colors = Some { enable = true }
}
Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server/src/ocaml_lsp_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ let initialize_info (client_capabilities : ClientCapabilities.t) : InitializeRes
~codeLensProvider
~referencesProvider:(`Bool true)
~documentHighlightProvider:(`Bool true)
~documentFormattingProvider:(`Bool false)
~documentFormattingProvider:(`Bool true)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above, this probably makes sense in the JS internal toolchain but isn't configurable by clients. Editor formatting (via the LSP) does work as expected (with version unset in .ocamlformat) with this capability enabled

~selectionRangeProvider:(`Bool true)
~documentSymbolProvider:(`Bool true)
~workspaceSymbolProvider:(`Bool true)
Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server/src/ocamlformat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ let formatter doc =
;;

let exec cancel bin args stdin =
let refmt = Fpath.to_string bin in
let refmt = Stdune.Path.to_string bin in
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change might not strictly be needed

let+ res, cancel = run_command cancel refmt stdin args in
match cancel with
| Cancelled () ->
Expand Down