Replies: 8 comments 2 replies
-
I just toggle them on and off all the time anyway, seems like the easy option:
|
Beta Was this translation helpful? Give feedback.
-
I'd love to see an option to render type hints at the end of each line rather than in the middle of my code. I find it really distracting when there are big type signatures in the middle of some logic. |
Beta Was this translation helpful? Give feedback.
-
Nvim does this because nvim can't display virtual text inline. And uses language server specific plugins to do so. Displaying virtual text past the EOL doesn't work well because there are often multiple imkay hints in the same line. It's not clear how they should be rendered (all of them, only some.one of them... which ones?). The details are language dependent and therefore dont belong in core. Helix only displays whatever the lsp is sending so this would be a feature request for upstream (rust-analyzer). |
Beta Was this translation helpful? Give feedback.
-
This is the reason it doesn't work well for me in helix - with multiple type hints, it becomes cluttered and I have a hard time seeing the actual code. Even with a single one inline, I find it harder than I'd like.
Wouldn't the answer be to render the final type of the line/expression? If I have |
Beta Was this translation helpful? Give feedback.
-
Toggling on and off seems good to me, especially when I'm trying to write iterators with call chains. It's convenient to be able to see what which step produces iterators of which elements, and use that information for debugging. |
Beta Was this translation helpful? Give feedback.
-
Adding context from the issue I reported as an idea to change visualisation here, as it didn't link itself here: After playing for some time with
I think that inlay hints would work better if by default, or optionally, could be rendered on the right-hand side of the code, instead of being interleaved with it. Beyond preference, that would also make it easier to not mess up the indentation and sometimes - the cursor. vim rust tools uses this approach. |
Beta Was this translation helpful? Give feedback.
-
I'd have another idea, have an option to truncate inlay hints if the line gets too long. Not sure what would be the preferred way to do it, but I imagine just having a setting, that truncates inlay hints if the line is overflowing. It could in this case truncate inlay hints, adding a |
Beta Was this translation helpful? Give feedback.
-
Another suggestion: on the top of the line, with the skipping while scrolling, like visual studio. Pretty much, everywhere except in the code. In here, check the "5 references| ...". |
Beta Was this translation helpful? Give feedback.
-
Currently the implementation for inlay hints presents some awkwardness when editing code, for example type hints will cause cursor(s) to "jump" when moving across them.
So I'm proposing some workarounds:
This feature is terrific, keep up the good work🖖🏾 Thank you.
Beta Was this translation helpful? Give feedback.
All reactions