Closed rwols closed 3 years ago
I tried this:
// Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings"
{
"settings": {
"rust-analyzer.inlayHints.enable": false
}
}
but it does not have any effect it seems.
Most likely this is a client-side setting (handled by the extension in VSCode) so should be handled from the helper side for us.
yeah I guess we could add a setting to check
Those settings are usually handled server side. However it seems to me that this one in particular is not so some special handling will need to be done.
I have "rust-analyzer.inlayHints.enable": false
set, but they're still appearing.
Versions:
LSP: v1.15.0
LSP-rust-analyzer: v1.0.1
Sublime Text: Dev Channel, Build 4125
I tried to update the packages, but it said all up to date. Has this change made it's way into a release yet? The inlay hints are rather annoying.
Thanks
Can you run "LSP: Troubleshoot Server" from the Command Palette and provide it's output?
## Server Configuration
- command
```json
[
"${storage_path}/LSP-rust-analyzer/rust-analyzer"
]
"/home/rope_/.cache/sublime-text/Package Storage/LSP-rust-analyzer/rust-analyzer"
source.rust
source.rust
{}
{
"rust-analyzer": {
"assist": {
"allowMergingIntoGlobImports": true,
"importEnforceGranularity": false,
"importGranularity": "crate",
"importGroup": true,
"importPrefix": "plain"
},
"callInfo": {
"full": true
},
"cargo": {
"allFeatures": false,
"autoreload": true,
"features": [],
"noDefaultFeatures": false,
"noSysroot": false,
"runBuildScripts": true,
"target": null,
"unsetTest": [
"core"
],
"useRustcWrapperForBuildScripts": true
},
"cargoRunner": null,
"checkOnSave": {
"allFeatures": null,
"allTargets": true,
"command": "check",
"enable": true,
"extraArgs": [],
"features": null,
"noDefaultFeatures": null,
"overrideCommand": null,
"target": null
},
"completion": {
"addCallArgumentSnippets": true,
"addCallParenthesis": true,
"autoimport": {
"enable": true
},
"autoself": {
"enable": true
},
"postfix": {
"enable": true
}
},
"debug": {
"engine": "auto",
"engineSettings": {},
"openDebugPane": false,
"sourceFileMap": {
"/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"
}
},
"diagnostics": {
"disabled": [],
"enable": true,
"enableExperimental": true,
"remapPrefix": {},
"warningsAsHint": [],
"warningsAsInfo": []
},
"experimental": {
"procAttrMacros": false
},
"files": {
"excludeDirs": [],
"watcher": "client"
},
"highlighting": {
"strings": true
},
"hover": {
"documentation": true,
"linksInHover": true
},
"hoverActions": {
"debug": true,
"enable": true,
"gotoTypeDef": true,
"implementations": true,
"linksInHover": true,
"references": false,
"run": true
},
"inlayHints": {
"chainingHints": true,
"enable": true,
"maxLength": 25,
"parameterHints": true,
"smallerHints": true,
"typeHints": true
},
"joinLines": {
"joinAssignments": true,
"joinElseIf": true,
"removeTrailingComma": true,
"unwrapTrivialBlock": true
},
"lens": {
"debug": true,
"enable": true,
"implementations": true,
"methodReferences": false,
"references": false,
"run": true
},
"linkedProjects": [],
"lruCapacity": null,
"notifications": {
"cargoTomlNotFound": true
},
"procMacro": {
"enable": true,
"server": null
},
"runnableEnv": null,
"runnables": {
"cargoExtraArgs": [],
"overrideCargo": null
},
"rustcSource": null,
"rustfmt": {
"enableRangeFormatting": false,
"extraArgs": [],
"overrideCommand": null
},
"terminusAutoClose": false,
"terminusUsePanel": false,
"workspace": {
"symbol": {
"search": {
"kind": "only_types",
"scope": "workspace"
}
}
}
}
}
{}
/home/rope_/Documents/Rust/bm-kart/src/main.rs
{
"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
"lsp_active": true,
"syntax": "Packages/Rust/Rust.sublime-syntax"
}
source.rust
[
"/home/rope_/Documents/Rust/bm-kart"
]
{
"folders": [
{
"path": "bm-kart"
}
],
"settings": {
"LSP": {
"rust-analyzer": {
"enabled": true
}
}
}
}
{
"clients": {
"zig": {
"command": [
"zls"
],
"selector": "source.zig"
}
},
"lsp_format_on_save": true
}
/home/rope_/.zls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LSP: Troubleshoot Server
My LSP-rust-analyzer.sublime-settings vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
// Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings"
{
"rust-analyzer.lens.references": true,
"rust-analyzer.lens.methodReferences": true,
"rust-analyzer.lens.run": false,
"rust-analyzer.inlayHints.enable": false,
"rust-analyzer.inlayHints.smallerHints": false,
"rust-analyzer.inlayHints.parameterHints": false,
"rust-analyzer.inlayHints.typeHints": false,
"rust-analyzer.inlayHints.chainingHints": false,
"rust-analyzer.inlayHints.maxLength": 0,
}
As the settings
section shows, the rust-analyzer.inlayHints.enable
is enabled.
You have to put your custom options inside a settings
object. Just look at and mimic the default options on the left.
For users that might not be interested in inlay hints, how does one disable inlay hints?