these 2 cmd line tools are relevant

  * nimfind
  * nimsuggest
  * this PR 
[https://github.com/nim-lang/Nim/pull/12076](https://github.com/nim-lang/Nim/pull/12076)
 allows a library solution to find declarations:



allows showing where a symbol is defined (works with all symbols) eg:
    
    
    inspect resolveSymbol(`$`)
    
/Users/timothee/git_clone/nim/Nim_prs/tests/magics/tresolve_overloads.nim:134:35:
 $ = closedSymChoice:
      /Users/timothee/git_clone/nim/Nim_prs/lib/system/dollars.nim:10:1 proc 
`$`(x: float): string {.magic: "FloatToStr", noSideEffect.}
      /Users/timothee/git_clone/nim/Nim_prs/lib/system/dollars.nim:128:1 proc 
`$`[T](x: seq[T]): string
    
    
    Run

also works if you want to find where a particular overload is defined: 
    
    
    inspect resolveSymbol(newLit(true))
    
/Users/timothee/git_clone/nim/Nim_prs/tests/magics/tresolve_overloads.nim:151:27:
 newLit = /Users/timothee/git_clone/nim/Nim_prs/lib/core/macros.nim:702:1 proc 
newLit(b: bool): NimNode {.compileTime.}
    
    
    Run

  * finding all usages is also possible (nimfind for cmdline tool, but it's 
very doable to do it as a library solution which has advantages)


Reply via email to