Skip to content

Commit

Permalink
autocomplete: use public over exported when available (#3058)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangoraw authored Oct 14, 2024
1 parent ef57025 commit 720a907
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/runner/PlutoRunner/src/ide features/completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ function is_pluto_controlled(m::Module)
end

function completions_exported(cs::Vector{<:Completion})
completed_modules = Set{Module}(c.parent for c in cs if c isa ModuleCompletion)
completed_modules_exports = Dict(
m => Set(names(m, all=is_pluto_workspace(m), imported=true))
for m in completed_modules
)

map(cs) do c
if c isa ModuleCompletion
Symbol(c.mod) completed_modules_exports[c.parent]
sym = Symbol(c.mod)
@static if isdefined(Base, :ispublic)
Base.ispublic(c.parent, sym)
else
Base.isexported(c.parent, sym)
end
else
true
end
Expand Down

0 comments on commit 720a907

Please sign in to comment.