Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Type hinting on cursor hover #190

Closed
pkieltyka opened this issue May 1, 2015 · 13 comments
Closed

Type hinting on cursor hover #190

pkieltyka opened this issue May 1, 2015 · 13 comments

Comments

@pkieltyka
Copy link

Is there a way for go-plus, or something in combination with it to output the type of a variable or function definition where the cursor is placed? This is something GoSublime does in Sublime and its very useful. The auto-complete stuff is cool, albeit, a bit overzealous (ie. its code-completing in a comment...), but knowing the types of code once its already written would be very nice :)

@joefitzgerald
Copy link
Owner

I agree, this is worth doing.

You can suppress completion in a comment via the Autocomplete Scope Blacklist preference, which is set by default to a scope of .source.go .comment. If you're getting suggestions in comments, they're not coming from gocode, they are from other packages you have installed. You can suppress scopes for all providers using the autocomplete-plus preference: Scope Blacklist.

@otm
Copy link

otm commented Oct 1, 2015

Type hinting is probably the one thing I miss the most. This is also very close to godoc support. Depending on how the UI is constructed.

@philk
Copy link
Contributor

philk commented Oct 1, 2015

What I'd actually love is something similar to GoInfo from vim-go where it shows the type info for the item under the cursor in the statusline:

screen shot 2015-10-01 at 12 51 46 pm

@otm
Copy link

otm commented Oct 1, 2015

That is very nice. In atom that could be combined with links to definition and documentation.

@jchannon
Copy link

jchannon commented Nov 9, 2015

Here's some code we use for @OmniSharp https://github.com/OmniSharp/omnisharp-atom/blob/1babb843c03982f18ab8819274d14e1225c54194/lib/omnisharp-atom/views/tooltip-view.ts

That will give the tooltips in Atom, we just need the API to call out when the mouse is hovering over a type

@thalesmello
Copy link

Yes, this would be really awesome

@gobijan
Copy link

gobijan commented Dec 6, 2015

+1 This is what I would really need for productive go coding in Atom.
I use the hinting feature all the time in Sublime Text 3 + GoSublime Plugin to see the parameters and return values of functions.

@ddgnani
Copy link

ddgnani commented Dec 11, 2015

+1

@josebalius
Copy link

+1 you can see this working nicely as well in the https://github.com/Microsoft/vscode-go package

@tonyxiao
Copy link

Is there any workaround available until this is officially implemented?

@ctcpip
Copy link

ctcpip commented Jul 10, 2016

+1

@joefitzgerald
Copy link
Owner

This functionality is provided in https://atom.io/packages/go-signature-statusbar. I think it would be nice to include this in go-plus, but I want to come up with an effective solution for #469 (comment) before including it.

@joefitzgerald
Copy link
Owner

This is now included in v5.0.0 of go-plus.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests