Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toggleInlayHintsCommand removal workaround? #1077

Closed
chase-lambert opened this issue Nov 4, 2022 · 3 comments
Closed

toggleInlayHintsCommand removal workaround? #1077

chase-lambert opened this issue Nov 4, 2022 · 3 comments
Assignees

Comments

@chase-lambert
Copy link

rust-analyzer has removed the toggleInlayHints function as discussed here: rust-lang/rust-analyzer#13215

I find that unfortunate as I really like to keep my editor "clean" when possible and find them way too noisy to have on all the time but quite useful on certain occasions. In the discussion linked above, they are talking about possible workarounds for folks to use but it all seems to be VS Code specific.

Can you think of a way I can get this toggle inlay hints thing working again with a keyboard shortcut?

What's the output of :CocInfo
ERROR (pid:9871) [node-client] - Error on notification "runCommand": Command: rust-analyzer.toggleInlayHints not found Error

What's the output of :CocCommand rust-analyzer.serverVersion
[coc.nvim] rust-analyzer 0.3.1266-standalone

What's your coc-rust-analyzer version? You can get it from :CocList extensions
coc-rust-analyzer 0.69.4

@fannheyward
Copy link
Owner

Use :CocCommand document.toggleInlayHint, check :h coc-inlayHint.

@chase-lambert
Copy link
Author

Thanks for the quick response. It has to be invoked on a per buffer basis and doesn't work if I try and set "inlayHint.enable" = false in the config in order to make the "off" position the default so not quite what I was hoping for but it's something.

@chase-lambert
Copy link
Author

For the record in case anyone stumbles upon this you want to set "inlayHint.display": false in your coc-settings.json (not "inlayHint.enable"). Then in your overall config you can set a keyboard shortcut to run :CocCommand document.toggleInlayHint to get back to that sweet hidden by default but available on command functionality some of us need and crave. haha

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

No branches or pull requests

2 participants