simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 159 forks source link

feat(inlay-hints): add inlay hints toggle function #346

Open TheFedaikin opened 1 year ago

TheFedaikin commented 1 year ago

Closes #345

adabarx commented 1 year ago

ooooh, this is exactly what I've been looking for! I'm not the maintainer, but I would add that updating this section of the readme would be useful.

other than that, I think this is great. I'm already using your branch in my config.

TheFedaikin commented 1 year ago

I am glad this works for you! Feel free to report if anything breaks, I'll try to patch this PR to fix that.

About the documentation, you are absolutely correct - I think I was too focused on the actual functionality that I forgot to improve that. I'll do that tomorrow, but from the looks of it, this repo is pretty slow nowadays, so I am not expecting this to be merged anytime soon, which is unfortunate.

TheFedaikin commented 1 year ago

Thanks everyone for the interest in this PR!

I updated implementation, created an external command for toggle and addressed the documentation comment.

Feel free to report regressions or/and add your suggestions for this issue here, it's been a very helpful feedback so far!

TheFedaikin commented 1 year ago

I changed the PR name so it's clear what it's current implementation is doing. Originally I was thinking about also exposing enabled and disabled state externally, but opted out of it. If you can think about the use-case that would need that feature, please let me know, but this works well for me at this moment.

utkarshgupta137 commented 1 year ago

I'm not sure if @simrat39 is active these days. I've been using https://github.com/lvimuser/lsp-inlayhints.nvim, which already has this option. It works perfectly with rust-tools. It also shows more information I think.

lcrownover commented 1 year ago

Just wanted to chime in that this feature would be super useful as I'd like to be able to start with them disabled but have the ability to easily show them 😄

MunifTanjim commented 1 year ago

I've pulled this in https://github.com/MunifTanjim/rust-tools.nvim/tree/patched

penso commented 1 year ago

Damn would love this to be merged.

nico-mayora commented 1 year ago

How close is this to getting merged?

TheFedaikin commented 1 year ago

@nico-mayora I don't want to be alarmist but I don't think the author has time for this project and there's absolutely no signs he will be back so it's probably easier to fork and cherry-pick changes that you want for yourself and use it. Alternatively we can wait (or find if it exists) for official fork so it can move forward.