Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Hover on declarations #41

Closed
fwcd opened this issue Jul 27, 2018 · 6 comments
Closed

Support Hover on declarations #41

fwcd opened this issue Jul 27, 2018 · 6 comments
Labels
enhancement New feature or request
Projects

Comments

@fwcd
Copy link
Owner

fwcd commented Jul 27, 2018

Show type information upon hover on a declaration.

Demo

@fwcd fwcd added the enhancement New feature or request label Jul 27, 2018
@fwcd fwcd added this to Todo in Roadmap via automation Jul 27, 2018
@fwcd fwcd closed this as completed in 951d066 Jul 29, 2018
Roadmap automation moved this from Todo to Done Jul 29, 2018
@Strum355
Copy link
Contributor

This doesnt seem to be working for me on latest commit.

@fwcd
Copy link
Owner Author

fwcd commented Aug 1, 2018

@Strum355 Could you please paste the output log?

@Strum355
Copy link
Contributor

Strum355 commented Aug 1, 2018

[INFO]      async0      main    Hovering at file:///home/noah/Kotlin/main.kt 5:8
[INFO]      async0      main    Re-parsing main.kt 5:5-6:26
[INFO]      async0      main    Compiling var x = something(10)
[INFO]      async0      main    Finished in 27 ms
fun something(x: Int): String {
    return "test ${x}"
}

fun main(args: Array<String>) {
    var x = something(10)
    println(x)
}

Hovering over x in the println call gives the correct hover, however hovering over x in the previous line gives nothing. Unfortunately this is all the log says. Is there a more verbose log i should enable?

@fwcd
Copy link
Owner Author

fwcd commented Aug 2, 2018

@Strum355 Ok, I will look into this soon. Sometimes the LS fails to infer a type, but should show an [ERROR] type upon hover nevertheless.

@fwcd
Copy link
Owner Author

fwcd commented Aug 2, 2018

@Strum355 I can't reproduce the issue.

image

The language server does not throw a stack trace either according to your log, so I suppose you are still somehow running an older version. Did you try building the the repo yourself or are you using the version on the VSCode marketplace?

@Strum355
Copy link
Contributor

Strum355 commented Aug 3, 2018

Ah yea it works from master, marketplace one must be an older one then. I dont remember if i was running from master in Extension Development mode or not at the time that I noticed it wasnt working. My bad ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Roadmap
  
Done
Development

No branches or pull requests

2 participants