Now that nimsuggest is working again, I tried switching source files.

As long as the inspected file is identical with the startup Nim file all works 
fine.

But for an editor with "Goto Definition" functionality we may open new files, 
where we want to use "Goto Definition" again.

I have no idea if that is intended to be supported at all, or how other IDE's 
may do that.

For me personally it would be OK if idetools support is only available for one 
single file.

But of course then we may wonder why nimsuggest commands do get file names as 
arguments at all.

I just tried this use case simulated from the command line: Working with 
strutils.nim request definition of doAssert(), open system.nim and request 
definition of proc len from within system.nim:
    
    
    nimsuggest --v2 --stdin /home/stefan/Nim/lib/pure/strutils.nim
    def 
/home/stefan/Nim/lib/pure/strutils.nim;/home/stefan/Nim/lib/pure/strutils.nim:2299,6
 # request definition of doAssert()
    def /home/stefan/Nim/lib/system.nim;/home/stefan/Nim/lib/system.nim:1973:14 
# request definition of len()
    lib/system/sysio.nim(168, 17) template/generic instantiation from here
    lib/system/sysio.nim(168, 17) template/generic instantiation from here
    lib/system/sysio.nim(168, 17) template/generic instantiation from here
    lib/system/sysio.nim(168, 17) template/generic instantiation from here

But it seems to be impossible to get useful output for module system.nim

Are we assumed to restart nimsuggest whenever file name changes? 

Reply via email to