Skip to content
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

Instructions for setting rust-analyzer settings are wrong #37

Closed
eero-lehtinen opened this issue Oct 31, 2023 · 1 comment · Fixed by #38
Closed

Instructions for setting rust-analyzer settings are wrong #37

eero-lehtinen opened this issue Oct 31, 2023 · 1 comment · Fixed by #38

Comments

@eero-lehtinen
Copy link
Contributor

eero-lehtinen commented Oct 31, 2023

Sorry but I don't want to fill a full bug report.

But anyway the README instructions and and the default config show that you should set rust-analyzer settings like this:

vim.g.rustaceanvim = {
  server = {
    ['rust-analyzer'] = {}
  }
}

But that doesn't work.

The configuration needs to be

vim.g.rustaceanvim = {
  server = {
    settings = {
      ['rust-analyzer'] = {}
    }
  }
}

as shown here.

The server key of the configuration is just passed to vim.lsp.start here, and that requires lsp settings to be inside the settings key.

I took way too long fiddling with my rust-analyzer settings before noticing that they just weren't getting applied at all D:

@mrcjkb
Copy link
Owner

mrcjkb commented Oct 31, 2023

Hey 😄

Thanks again for the detailed report and the fix!

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

Successfully merging a pull request may close this issue.

2 participants