sublimelsp / LSP-rust-analyzer

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

Settings for the package are ignored #99

Closed friedkeenan closed 1 year ago

friedkeenan commented 1 year ago

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.

rchl commented 1 year ago

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

friedkeenan commented 1 year ago

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.

T0mstone commented 10 months ago

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