go-signature-statusbar
go-signature-statusbar copied to clipboard
Width is too small to show all arguments
I often have the following problem:
Variable names are not short enough and too many arguments are present in function signature.
Thus, I can only see some portion of it. It may be nice if I can adjust the width. I noticed your commit 17ff9e0404b4d9d506b39e73fe092781804be9fe and changed package.json
to increase the width. After restarting Atom width increased but nevertheless some functions just don't fit there.
In fact, it would be great if a popup is shown since functions may have many arguments and status bar i not long enough to show it. However this repo's name is go-signature-statusbar so maybe it's not fit for this project :)
@kaskavalci Thanks for the feedback. v1.1.0 should indeed improve situations where the signature of a function is very long. I'm not sure what you mean by
changed
package.json
to increase the width
. Have you tried changing the value of the setting Width
in Preferences > Packages > go-signature-statusbar
to none
?
I think a popup would be too distracting, but a tooltip when hovering the signature is a viable solution. Not sure when I get to it, though. Pull requests are always appreciated.
I'm still seeing this issue in v1.1.0. Changing the width doesn't seem to have any effect.
@ssoroka That's odd. Basically, what the feature does is changing the CSS attribute max-width
to the value set in the settings. As I'm not seeing the issue in my setup, maybe there is a different package or setting that is causing the trouble?
In order for me to get a better understanding of this, please provide the following information:
- Wich version of Atom do you use?
- Do you have other packages installed that make use of the status bar?
- Please change the width in the settings of the package, switch to Go source file, open the Developer Console (
cmd + opt + i
on my mac) and inspect the element in the status bar (its CSS class is calledgo-signature-statusbar
). Ismax-width
changed to the value you set in the settings? - Could you provide a screenshot of the status bar? Here is mine:
Thanks!
I suggest you do away with the notion of max with, and operate the same way the file info display in the status bar does: https://github.com/atom/status-bar/blob/57d69026a2515279ad00d8717a141ef3ff7b9304/styles/status-bar.less#L67
I'm not seeing the issue at the moment, though @joefitzgerald 's suggestion seems like a reasonable one.