mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* for inlay type hints, take only nimsuggest symbols with isGenericInstance = false
* for inlay exception hints, take only nimsuggest symbols with isGenericInstance = true
This commit is contained in:
@@ -1271,9 +1271,9 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile,
|
||||
|
||||
let s = graph.findSymDataInRange(file, line, col, endLine, endCol)
|
||||
for q in s:
|
||||
if typeHints and q.sym.kind in {skLet, skVar, skForVar, skConst} and q.isDecl and not q.sym.hasUserSpecifiedType:
|
||||
if typeHints and q.sym.kind in {skLet, skVar, skForVar, skConst} and q.isDecl and not q.sym.hasUserSpecifiedType and not q.isGenericInstance:
|
||||
graph.suggestInlayHintResultType(q.sym, q.info, ideInlayHints)
|
||||
if exceptionHints and q.sym.kind in {skProc, skFunc, skMethod, skVar, skLet, skParam} and not q.isDecl:
|
||||
if exceptionHints and q.sym.kind in {skProc, skFunc, skMethod, skVar, skLet, skParam} and not q.isDecl and q.isGenericInstance:
|
||||
graph.suggestInlayHintResultException(q.sym, q.info, ideInlayHints, caughtExceptions = q.caughtExceptions, caughtExceptionsSet = q.caughtExceptionsSet)
|
||||
else:
|
||||
myLog fmt "Discarding {cmd}"
|
||||
|
||||
Reference in New Issue
Block a user