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

Option to disable inlay hints for functions with single argument.

Open da-revo opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. In go inlay hints are quite helpful, but they can be extremely distracting when there are too many of them when they are not necessary.

Describe the solution you'd like Having the ability to turn off inlay hints when there is just a single argument will make all lines like these far more readable.

Describe alternatives you've considered Reference: https://github.com/microsoft/vscode/issues/160482

Additional context 189284074-7b85a302-7db6-4d1f-ba98-b18d0d32a7b7 189341878-eda0168f-91a0-48ac-9b6b-14ba757595d5 189284463-38cefeaa-dbbc-4edd-85b1-45d000b82443

da-revo avatar Sep 13 '22 19:09 da-revo

CC @suzmue @jamalc

findleyr avatar Sep 14 '22 23:09 findleyr

2p: if we can avoid configuration, that would be better. Could this be the default behavior? What do other languages do?

findleyr avatar Sep 16 '22 19:09 findleyr

my 2c: I use "editor.inlayHInts.enabled": "offUnlessPressed" which allows me to see inlay hints only when I want to see. Presenting inlayhints all the time can be very distracting already. I don't know how much of improvement would be made by not showing the inlay hints for function with single argument.

Usefulness of the single argument inlay hints depends on the function author IMO. For example, in the above example I see the inlay hints carry useful info. It expects one or more "docs", which I find quite useful.

err = db.message.Insert(/*docs...:*/ msg)

hyangah avatar Sep 16 '22 19:09 hyangah