Skip to content

Commit

Permalink
a bit follow up #744
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jul 3, 2020
1 parent 78c80ef commit 80b90b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/requests/features.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 80b90b5

Please sign in to comment.