Skip to content

Inlay Hints no longer configurable #11745

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

Closed
dnut opened this issue Mar 17, 2022 · 1 comment
Closed

Inlay Hints no longer configurable #11745

dnut opened this issue Mar 17, 2022 · 1 comment

Comments

@dnut
Copy link

dnut commented Mar 17, 2022

rust-analyzer version: 5e85158 2022-03-14 stable
rustc version: rustc 1.59.0 (9d1b2106e 2022-02-23)

I noticed my inlayHints recently changed to an obnoxious bright blue color, so I dug into settings and added this in an attempt to change it to something more subtle.

https://rust-analyzer.github.io/manual.html#color-configurations

According to this document, rust_analyzer.inlayHints.background should be a supported setting. I tried to use this but I get this error "Property rust_analyzer.inlayHints.background is not allowed."

    "workbench.colorCustomizations": {
        "[Ocean Dark Extended]": {
            "rust_analyzer.inlayHints.background": "#2B303B"
        }
    },

inlayHints not allowed

Full settings.json
{
    "editor.fontFamily": "hack",
    "files.autoSave": "afterDelay",
    "explorer.confirmDragAndDrop": false,
    "workbench.tree.indent": 20,
    "rust-analyzer.inlayHints.typeHints": false,
    "security.workspace.trust.enabled": false,
    "window.openFoldersInNewWindow": "on",
    "window.openFilesInNewWindow": "default",
    "editor.selectionClipboard": false,
    "editor.minimap.enabled": false,
    "workbench.editor.limit.enabled": true,
    "workbench.editor.limit.perEditorGroup": true,
    "workbench.editor.limit.value": 8,
    "workbench.preferredDarkColorTheme": "Ocean Dark Extended",
    "window.autoDetectColorScheme": true,
    "workbench.colorTheme": "Ocean Dark Extended",



    "editor.tokenColorCustomizations": {
        "variables": "#AB7967",
        "textMateRules": [
            // {
            //     "scope": "source",
            //     "settings": {
            //         "foreground": "#AB7967"
            //     }
            // },
            {
                "scope": "entity.name.namespace",
                "settings": {
                    // "foreground": "#65737E"
                    // "foreground": "#947C73"
                    "foreground": "#888888"
                }
            },
            {
                "scope": "keyword.operator.namespace",
                "settings": {
                    "foreground": "#888888"
                }
            },
            { // annotation
                "scope": "meta.attribute",
                "settings": {
                    "foreground": "#BBB529"
                }
            },
            {
                "scope": "entity.name.type.lifetime",
                "settings": {
                    "foreground": "#507874"
                }
            },
            // {
            //     "scope": "entity.name.module",
            //     "settings": {
            //         "foreground": "#AB7967"
            //     }
            // },
            {
                "scope": "entity.name.type",
                "settings": {
                    "foreground": "#EBCB8B"
                }
            },
            { // this actually sets the color for field accessors, and function names remain blue
                // however, it also changes parens and brackets in a function call or array access
                "scope": "meta.function.call.rust",
                "settings": {
                    "foreground": "#BF616A"
                }
            },
            { // this is needed to counteract meta.function.call.rust configuration for parens
                "scope": "punctuation.brackets.round.rust",
                "settings": {
                    "foreground": "#C0C5CE"
                }
            },
            { // this is needed to counteract meta.function.call.rust configuration for brackets
                "scope": "punctuation.brackets.square.rust",
                "settings": {
                    "foreground": "#C0C5CE"
                }
            },
            // {
            //     "scope": "entity.name.type.trait",
            //     "settings": {
            //         "foreground": "#A3BE8C"
            //     }
            // },
            {
                "scope": "variable.language.self",
                "settings": {
                    "foreground": "#F3D5EE"
                }
            },
            {
                "scope": "keyword",
                "settings": {
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "storage",
                "settings": {
                    "fontStyle": "bold"
                }
            }
        ]
    },
    "workbench.colorCustomizations": {
        "[Ocean Dark Extended]": {
            "rust_analyzer.inlayHints.background": "#2B303B"
        }
    },
    "window.title": "${dirty}${rootName}${separator}",
    "gitlens.codeLens.enabled": false,
    "gitlens.currentLine.enabled": false,
    "gitlens.hovers.currentLine.over": "line",
    "gitlens.hovers.enabled": false,
    "editor.mouseWheelScrollSensitivity": 2,
    "workbench.editor.revealIfOpen": true,
    "[rust]": {
        "editor.defaultFormatter": "matklad.rust-analyzer"
    },
    "files.associations": {
        "*.txt": "plaintext"
    },
    "git.confirmSync": false,
    "git.enableCommitSigning": true,
    "files.exclude": {
        "": true,
        "**/.git": false
    },
    "terminal.external.linuxExec": "terminator"
}
@lnicola
Copy link
Member

lnicola commented Mar 17, 2022

See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/manual.adoc#color-configurations and #11733.

@lnicola lnicola closed this as completed Mar 17, 2022
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