Open grappas opened 1 month ago
You mean let args: std::Vec<std::String> = std::env::args().collect();
, right?
I don't think we want to do this. It's a lot of noise, and people are already asking us to completely disable inlay hints by default because they find them to be too much. You should be able to see the full path on hover (which you can also trigger using the keyboard) or Peek Definition (Ctrl-Shift-F10).
Sure. Point for you, but... shouldn't be there a way to customize what would be shown in inlay hints? Inlay hints seems to be togglable also. At least for me in neovim with keyboard shortcut.
shouldn't be there a way to customize what would be shown in inlay hints
You can customize the important things: whether to show them for variables, parameters, generic parameters, lifetimes, consts, whether to show chaining hints, even whether to show the colons. We have 27 settings by my count, compared to 4 for Python and 8 for TypeScript.
But in the long term, users will ask to make everything customizable, which means that nobody will ever be able to go through all the settings. Check out this tiny subset of IntelliJ's formatting settings:
At least for inlay hints they have almost no settings at all:
That said, if you have ambiguous imports in your code, it might be better to specify them in full tiberius::time::chrono::DateTime
. They will take the same amount of screen space as the hints, and they'll always be there when you need them.
Or you can drop your chrono
dependency and use the re-export, since that's what's going to work best.
It can be disabled by default. I wouldn't mind. :)
i.e. we import module:
and we arm args:
What would be nice is to optionally see in inlay hints from where args() is coming from
or lets say to distinguish from different implementations of chrono structs ( if it is chrono from chrono or chrono from tiberius for example) That would increase readability. Especially for new rustaceans. :)