From 80b90b5d46c058f7c53280911629fede7ecaaf66 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Fri, 3 Jul 2020 23:58:31 +0900 Subject: [PATCH] a bit follow up #744 --- src/requests/features.jl | 3 +-- src/utilities.jl | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/requests/features.jl b/src/requests/features.jl index 838e51b5..cf0845e2 100644 --- a/src/requests/features.jl +++ b/src/requests/features.jl @@ -377,8 +377,6 @@ function get_module_of(s::StaticLint.Scope, ms = []) end end -using Base.Docs, Markdown - function julia_getDocAt_request(params::VersionedTextDocumentPositionParams, server::LanguageServerInstance, conn) uri = URI2(params.textDocument.uri) hasdocument(server, uri) || return nodocuemnt_error(uri) @@ -391,6 +389,7 @@ function julia_getDocAt_request(params::VersionedTextDocumentPositionParams, ser x = get_expr1(getcst(doc), get_offset(doc, params.position)) x isa EXPR && typof(x) === CSTParser.OPERATOR && resolve_op_ref(x, server) documentation = get_hover(x, "", server) + md = Markdown.parse(documentation) return webview_html(md) end diff --git a/src/utilities.jl b/src/utilities.jl index f7a4c022..ecf46ef2 100644 --- a/src/utilities.jl +++ b/src/utilities.jl @@ -5,7 +5,7 @@ function mismatched_version_error(uri, doc, params, msg, data = nothing) return JSONRPC.JSONRPCError( -32099, "version mismatch in $(msg) request for $(uri): JLS $(doc._version), client: $(params.version)", - nothing + data ) end