You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inside template2():state. provides the appropriate completion state.testVal
When inside template_outside completion doesn't work for state. or for otherState. the completion list simply shows all symbols
Me reproducing this same issue with the cli:
\nimsuggestTests\src> nimsuggest --maxResults:5 ./nimsuggestTests.nim
usage: sug|con|def|use|dus|chk|mod|highlight|outline|known|project file.nim[;dirtyfile.nim]:line:col
type 'quit' to quit
type 'debug' to toggle debug mode on/off
type 'terse' to toggle terse mode on/off
> sug nimsuggestTests.nim:28:15
sug skProc nimsuggestTests.procTest proc (): int C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 15 5 "" 100 None
sug skVar nimsuggestTests.state TestData C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 64 "" 100 None
sug skProc nimsuggestTests.app_main proc () C:\Programming\nim\yogurt-nim\nimsuggestTests\src\other.nim 27 "" 100 None
sug skTemplate nimsuggestTests.template2 template (blk: untyped): untyped C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 11 9 "" 50 None
sug skConst system.isMainModule bool C:\Users\Eli\.choosenim\toolchains\nim-#devel\lib\system\compilation.nim 24 2 "True only when accessed in the main module. This works thanks to\x0Acompiler magic. It is useful to embed testing code in a module." 100 None
> sug nimsuggestTests.nim:19:22
sug skField testVal int C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 42 "" 100 Prefix
>
Nim Version
1.9.3
Current Output
sug skProc nimsuggestTests.procTest proc (): int C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 15 5 "" 100 None
sug skVar nimsuggestTests.state TestData C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 64 "" 100 None
sug skProc nimsuggestTests.app_main proc () C:\Programming\nim\yogurt-nim\nimsuggestTests\src\other.nim 27 "" 100 None
sug skTemplate nimsuggestTests.template2 template (blk: untyped): untyped C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 11 9 "" 50 None
sug skConst system.isMainModule bool C:\Users\Eli\.choosenim\toolchains\nim-#devel\lib\system\compilation.nim 24 2 "True only when accessed in the main module. This works thanks to\x0Acompiler magic. It is useful to embed testing code in a module." 100 None
Expected Output
sug skField testVal int C:\Programming\nim\yogurt-nim\nimsuggestTests\src\nimsuggestTests.nim 42 "" 100 Prefix
Possible Solution
I'm unsure, maybe something related to scoping within templates. Perhaps we don't look within the local scope inside a template when it comes from an import?
Description
When doing a suggestion in a template defined outside a file it doesn't suggest correctly.
mainFile.nim
other.nim
When inside
template2():
state.
provides the appropriate completionstate.testVal
When inside template_outside completion doesn't work for
state.
or forotherState.
the completion list simply shows all symbolsMe reproducing this same issue with the cli:
Nim Version
1.9.3
Current Output
Expected Output
Possible Solution
I'm unsure, maybe something related to scoping within templates. Perhaps we don't look within the local scope inside a template when it comes from an import?
Additional Information
This is a duplicate of nim-lang/langserver#42
The text was updated successfully, but these errors were encountered: