Rust-Analyzer not showing toggle inlay hints

Hi. When I try to add a keybind for "toggle inlay hints", it's not actually an option. Futhermore, when I try to use "toggle inlay hints" in the command palette, it's not there. Any help is appreciated!

The command was removed recently, in favor of letting the client provide a client-side toggle mechanism. I believe VS Code has plugins for toggling a setting like editor.inlayHints.enabled with a key binding, and it can also be configured to only show hints when Ctrl+Alt is pressed.

Ah ok. Any idea what those plugins are called?

Nevermind, found it, "rebornix.toggle". For anyone coming across this, here's an example keybind config:

{
        "key": "ctrl+shift+/",
        "command": "toggle",
        "when": "editorTextFocus",
        "args": {
            "id": "inlayHints",
            "value": [
                {
                    "editor.inlayHints.enabled": true
                },
                {
                    "editor.inlayHints.enabled": false
                }
            ]
        }
    }
2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.