Skip to content

Commit 04c2570

Browse files
committed
fix: show underlying datatype docstring for functions
1 parent 881ada8 commit 04c2570

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/requests/hover.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ function get_hover(f::SymbolServer.FunctionStore, documentation::String, server,
149149
documentation = string(documentation, f.doc, "\n\n")
150150
end
151151

152+
if !isnothing(env)
153+
edt = StaticLint.get_eventual_datatype(f, env)
154+
if edt isa SymbolServer.DataTypeStore
155+
documentation = string(get_hover(edt, documentation, server, expr, env), "\n\n")
156+
end
157+
end
158+
152159
if expr !== nothing && env !== nothing
153160
tls = StaticLint.retrieve_toplevel_scope(expr)
154161
itr = func -> StaticLint.iterate_over_ss_methods(f, tls, env, func)

0 commit comments

Comments
 (0)