diff --git a/ocaml-lsp-server/src/custom_requests/custom_request.ml b/ocaml-lsp-server/src/custom_requests/custom_request.ml index 932172dd5..ae76394dd 100644 --- a/ocaml-lsp-server/src/custom_requests/custom_request.ml +++ b/ocaml-lsp-server/src/custom_requests/custom_request.ml @@ -5,4 +5,4 @@ module Switch_impl_intf = Req_switch_impl_intf module Typed_holes = Req_typed_holes module Type_enclosing = Req_type_enclosing module Wrapping_ast_node = Req_wrapping_ast_node -module Documentation = Req_documentation +module Get_documentation = Req_get_documentation diff --git a/ocaml-lsp-server/src/custom_requests/custom_request.mli b/ocaml-lsp-server/src/custom_requests/custom_request.mli index ff361f7bb..1033883bc 100644 --- a/ocaml-lsp-server/src/custom_requests/custom_request.mli +++ b/ocaml-lsp-server/src/custom_requests/custom_request.mli @@ -7,4 +7,4 @@ module Switch_impl_intf = Req_switch_impl_intf module Typed_holes = Req_typed_holes module Type_enclosing = Req_type_enclosing module Wrapping_ast_node = Req_wrapping_ast_node -module Documentation = Req_documentation +module Get_documentation = Req_get_documentation diff --git a/ocaml-lsp-server/src/custom_requests/req_documentation.ml b/ocaml-lsp-server/src/custom_requests/req_get_documentation.ml similarity index 98% rename from ocaml-lsp-server/src/custom_requests/req_documentation.ml rename to ocaml-lsp-server/src/custom_requests/req_get_documentation.ml index cab2b953f..5b86acd77 100644 --- a/ocaml-lsp-server/src/custom_requests/req_documentation.ml +++ b/ocaml-lsp-server/src/custom_requests/req_get_documentation.ml @@ -2,7 +2,7 @@ open Import module TextDocumentPositionParams = Lsp.Types.TextDocumentPositionParams let meth = "ocamllsp/getDocumentation" -let capability = "handleDocumentation", `Bool true +let capability = "handleGetDocumentation", `Bool true module GetDocClientCapabilities = struct type _t = { contentFormat : MarkupKind.t list } diff --git a/ocaml-lsp-server/src/custom_requests/req_documentation.mli b/ocaml-lsp-server/src/custom_requests/req_get_documentation.mli similarity index 100% rename from ocaml-lsp-server/src/custom_requests/req_documentation.mli rename to ocaml-lsp-server/src/custom_requests/req_get_documentation.mli diff --git a/ocaml-lsp-server/src/ocaml_lsp_server.ml b/ocaml-lsp-server/src/ocaml_lsp_server.ml index de74a0653..1b85b9ebc 100644 --- a/ocaml-lsp-server/src/ocaml_lsp_server.ml +++ b/ocaml-lsp-server/src/ocaml_lsp_server.ml @@ -94,7 +94,7 @@ let initialize_info (client_capabilities : ClientCapabilities.t) : InitializeRes ; Req_hover_extended.capability ; Req_merlin_call_compatible.capability ; Req_type_enclosing.capability - ; Req_documentation.capability + ; Req_get_documentation.capability ] ) ] in @@ -508,7 +508,7 @@ let on_request ; Req_typed_holes.meth, Req_typed_holes.on_request ; Req_merlin_call_compatible.meth, Req_merlin_call_compatible.on_request ; Req_type_enclosing.meth, Req_type_enclosing.on_request - ; Req_documentation.meth, Req_documentation.on_request + ; Req_get_documentation.meth, Req_get_documentation.on_request ; Req_wrapping_ast_node.meth, Req_wrapping_ast_node.on_request ; ( Semantic_highlighting.Debug.meth_request_full , Semantic_highlighting.Debug.on_request_full ) diff --git a/ocaml-lsp-server/test/e2e-new/documentation.ml b/ocaml-lsp-server/test/e2e-new/documentation.ml index 7aa50021f..ff73fed59 100644 --- a/ocaml-lsp-server/test/e2e-new/documentation.ml +++ b/ocaml-lsp-server/test/e2e-new/documentation.ml @@ -1,5 +1,5 @@ open Test.Import -module Req = Ocaml_lsp_server.Custom_request.Documentation +module Req = Ocaml_lsp_server.Custom_request.Get_documentation module Util = struct let call_documentation ~position ?(identifier = None) ?(contentFormat = None) client = @@ -18,7 +18,7 @@ module Util = struct ;; let print_documentation result = - result |> Yojson.Safe.pretty_to_string ~std:false |> print_endline + Test.print_result result ;; let test ~line ~character ?identifier ?contentFormat source = diff --git a/ocaml-lsp-server/test/e2e-new/start_stop.ml b/ocaml-lsp-server/test/e2e-new/start_stop.ml index 115daa454..4216a64ea 100644 --- a/ocaml-lsp-server/test/e2e-new/start_stop.ml +++ b/ocaml-lsp-server/test/e2e-new/start_stop.ml @@ -92,7 +92,7 @@ let%expect_test "start/stop" = "handleHoverExtended": true, "handleMerlinCallCompatible": true, "handleTypeEnclosing": true, - "handleDocumentation": true + "handleGetDocumentation": true } }, "foldingRangeProvider": true,