sublimelsp / LSP-rust-analyzer

Convenience package for rust-analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Settings for the package are ignored

friedkeenan opened this issue · comments

I'm sure something in my environment must be messed up, but I can't seem to figure out what.

No matter what settings I put for this package, none of them seem to take effect. For instance with

// Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings"

{
    "rust-analyzer.completion.autoimport.enable": false,
}

auto-imports still occur. And with

// Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings"

{
    "rust-analyzer.completion.callable.snippets": "add_parentheses",
}

I still get arguments filled in when autocompleting functions. And with

// Settings in here override those in "LSP-rust-analyzer/LSP-rust-analyzer.sublime-settings"

{
    "rust-analyzer.lens.enable": false,
}

I still see lenses, such as "Run" next to main and a count of implementations next to struct definitions.

And of course, all of this has been tested with full restarts of Sublime. I'm on linux, and the package settings file gets saved to ~/.config/sublime-text/Packages/User/LSP-rust-analyzer.sublime-settings like I would expect, overriding the settings for the package located at ~/.config/sublime-text/Installed Packages/LSP-rust-analyzer.sublime-package. So I don't know what's going on. Any help would be greatly appreciated.

You have to use the same settings structure as the default settings show. You are missing the settings object

Oh my god. I'm so sorry. Thank you, my brain completely just failed to register that there was nesting going on. I would say maybe it's worth adding a comment above the settings key noting "hey this is nested" or something like that but I feel like this issue is probably only limited to me. Again, thank you.

OH MY GOD! Thank you so much for having this issue before me😅