vscode-nim icon indicating copy to clipboard operation
vscode-nim copied to clipboard

Hovering on imports doesn't work

Open xmonader opened this issue 8 years ago • 3 comments

I try to from strutils import parseInt

Hovering on strutils or parseInt doesn't work in the import line, but if i hover of parseInt procedure call i get it nice link that moves me to strutils.nim?

Versions: vscode-nim: 0.5.26 vscode: 1.15

Thanks for the great job!

xmonader avatar Aug 13 '17 19:08 xmonader

Another example

import threadpool

proc hello(n: int) =
  echo "Hello: " & $(n)

proc main() =
  for i in 1..10:
    spawn hello(i)

main()

Cmd-MMB click on threadpool in import threadpool does nothing. Trying to go to the definition of the spawn proc is equally futile, if the spawn is actually followed by the proc you want to spawn, it's possible to go to a definition of the spawn otherwise, just try removing the hello(i) part in the example above.

Don't know if this is caused by the plugin or the nimsuggest itself, so I mentioned this issue in both Nim's IRC channel and here. Really hope there is a solution to this.

Nim 0.17.2
VSCode 1.17.2
Nim plugin 0.5.27
macOS 10.12.6

yay avatar Nov 07 '17 21:11 yay

the problem is nimsuggest, it has no support for import suggestions nor for "go-to-definition" for modules. See here: https://github.com/nim-lang/nimsuggest/issues/47

RSDuck avatar Nov 07 '17 21:11 RSDuck

This issue can get closed. It works flawless using the latest nightly version of nimsuggest (built via koch tools -d:release after compiling the latest nim version as described on the site).

ghost avatar Feb 10 '18 09:02 ghost