sublimelsp / LSP-rust-analyzer

Convenience package for rust-analyzer
MIT License
70 stars 11 forks source link

How does one disable inlay hints? #20

Closed rwols closed 3 years ago

rwols commented 3 years ago

For users that might not be interested in inlay hints, how does one disable inlay hints?

rwols commented 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.

rchl commented 3 years ago

Most likely this is a client-side setting (handled by the extension in VSCode) so should be handled from the helper side for us.

daggy1234 commented 3 years ago

yeah I guess we could add a setting to check

Rapptz commented 3 years ago

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.

rope-hmg commented 2 years ago

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

rchl commented 2 years ago

Can you run "LSP: Troubleshoot Server" from the Command Palette and provide it's output?

rope-hmg commented 2 years ago

Troubleshooting: rust-analyzer

Version

## Server Configuration
 - command
```json
[
  "${storage_path}/LSP-rust-analyzer/rust-analyzer"
]

Active view

Project / Workspace

LSP configuration

{
  "clients": {
    "zig": {
      "command": [
        "zls"
      ], 
      "selector": "source.zig"
    }
  }, 
  "lsp_format_on_save": true
}

System PATH

rchl commented 2 years ago

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.