Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions compiler/tools/suggest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,17 @@ proc symToSuggest(g: ModuleGraph; s: PSym, isLocal: bool, section: IdeCmd, info:
result.quality = quality
result.isGlobal = sfGlobal in s.flags
result.prefix = prefix
result.contextFits = inTypeContext == (s.kind in {skType, skGenericParam})
if section in {ideSug, ideCon}:
result.contextFits = inTypeContext == (s.kind in {skType, skGenericParam})
result.scope = scope
result.name = addr s.name.s
when defined(nimsuggest):
result.globalUsages = s.allUsages.len
var c = 0
for u in s.allUsages:
if u.fileIndex == info.fileIndex: inc c
result.localUsages = c
if section in {ideSug, ideCon}:
result.globalUsages = s.allUsages.len
var c = 0
for u in s.allUsages:
if u.fileIndex == info.fileIndex: inc c
result.localUsages = c
result.symkind = byte s.kind
result.qualifiedPath = @[]
if not isLocal and s.kind != skModule:
Expand All @@ -191,7 +193,8 @@ proc symToSuggest(g: ModuleGraph; s: PSym, isLocal: bool, section: IdeCmd, info:
else:
result.forth = ""
when defined(nimsuggest) and not defined(noDocgen) and not defined(leanCompiler):
result.doc = extractDocComment(g, s)
if section != ideHighlight:
result.doc = extractDocComment(g, s)
let infox =
if useSuppliedInfo or section in {ideUse, ideHighlight, ideOutline}:
info
Expand Down