Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TheFedaikin
Copy link

Closes #345

@adabarx
Copy link

adabarx commented Apr 8, 2023

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
Copy link
Author

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
Copy link
Author

TheFedaikin commented May 3, 2023

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 TheFedaikin requested a review from barthap May 3, 2023 13:26
@TheFedaikin TheFedaikin changed the title feat(inlay-hints): add inlay hints global state and toggle function feat(inlay-hints): add inlay hints toggle function May 3, 2023
@TheFedaikin
Copy link
Author

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
Copy link

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
Copy link

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 😄

Copy link

@MunifTanjim MunifTanjim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add another variable M.is_enabled. Just need to fix the existing one. I've added the suggestions.

lua/rust-tools/inlay_hints.lua Outdated Show resolved Hide resolved
lua/rust-tools/inlay_hints.lua Outdated Show resolved Hide resolved
lua/rust-tools/inlay_hints.lua Outdated Show resolved Hide resolved
lua/rust-tools/inlay_hints.lua Outdated Show resolved Hide resolved
MunifTanjim pushed a commit to MunifTanjim/rust-tools.nvim that referenced this pull request May 20, 2023
@MunifTanjim
Copy link

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

@penso
Copy link

penso commented Jun 3, 2023

Damn would love this to be merged.

@nico-mayora
Copy link

How close is this to getting merged?

@TheFedaikin
Copy link
Author

TheFedaikin commented Jun 27, 2023

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Toggle Inlay Hints
8 participants