Skip to content

Commit

Permalink
fix: init_options is no longer supported in the rust-analyzer lsp c…
Browse files Browse the repository at this point in the history
…onfig

As lspconfig states in the doc,
https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#rust_analyzer
we need to pass the additional lspMux in the settings instead. This PR
tries to fix the example config for neovim LSP.
  • Loading branch information
YuanYuYuan authored and pr2502 committed Oct 8, 2024
1 parent a3f1a5c commit cd91289
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/neovim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ require'lspconfig'.rust_analyzer.setup {
cmd = vim.lsp.rpc.connect("127.0.0.1", 27631),
-- When using unix domain sockets, use something like:
--cmd = vim.lsp.rpc.connect("/path/to/ra-multiplex.sock"),
init_options = {
lspMux = {
version = "1",
method = "connect",
server = "rust-analyzer",
settings = {
["rust-analyzer"] = {
lspMux = {
version = "1",
method = "connect",
server = "rust-analyzer",
},
},
},
}

0 comments on commit cd91289

Please sign in to comment.