Skip to content

Commit 814040e

Browse files
authored
feat!: drop ra-multiplex support in favour of lspmux (#909)
1 parent 93644c7 commit 814040e

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -756,14 +756,14 @@ by setting the rust-analyzer
756756

757757
<details>
758758
<summary>
759-
<b>ra-multiplex</b>
759+
<b>lspmux</b>
760760
</summary>
761761

762762
On Linux and MacOS, rustaceanvim can auto-detect and connect to a
763-
running [ra-multiplex](https://github.com/pr2502/ra-multiplex) server.
763+
running [lspmux](https://codeberg.org/p2502/lspmux) server.
764764
By default, it will try to do so automatically if the `vim.g.rustaceanvim.server.cmd`
765765
option is unset.
766-
See also `:h rustaceanvim.ra_multiplex`.
766+
See also `:h rustaceanvim.lspmux`.
767767

768768
</details>
769769

doc/rustaceanvim.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -313,28 +313,28 @@ rustaceanvim.rustc.Opts *rustaceanvim.rustc.Opts*
313313
rustaceanvim.lsp.ClientOpts *rustaceanvim.lsp.ClientOpts*
314314

315315
Fields: ~
316-
{auto_attach?} (boolean|fun(bufnr:integer):boolean)
317-
Whether to automatically attach the LSP client.
318-
Defaults to `true` if the `rust-analyzer` executable is found.
319-
{cmd?} (string[]|fun():string[]|fun(dispatchers:vim.lsp.rpc.Dispatchers):vim.lsp.rpc.PublicClient)
320-
Command and arguments for starting rust-analyzer
321-
Can be a list of arguments, a function that returns a list of arguments,
322-
or a function that returns an LSP RPC client factory (see |vim.lsp.rpc.connect|).
323-
{root_dir?} (string|fun(filename:string,default:fun(filename:string):string|nil):string|nil)
324-
The directory to use for the attached LSP.
325-
Can be a function, which may return nil if no server should attach.
326-
The second argument contains the default implementation, which can be used for fallback behavior.
327-
{ra_multiplex?} (rustaceanvim.ra_multiplex.Opts)
328-
Options for connecting to ra-multiplex.
329-
330-
331-
rustaceanvim.ra_multiplex.Opts *rustaceanvim.ra_multiplex.Opts*
316+
{auto_attach?} (boolean|fun(bufnr:integer):boolean)
317+
Whether to automatically attach the LSP client.
318+
Defaults to `true` if the `rust-analyzer` executable is found.
319+
{cmd?} (string[]|fun():string[]|fun(dispatchers:vim.lsp.rpc.Dispatchers):vim.lsp.rpc.PublicClient)
320+
Command and arguments for starting rust-analyzer
321+
Can be a list of arguments, a function that returns a list of arguments,
322+
or a function that returns an LSP RPC client factory (see |vim.lsp.rpc.connect|).
323+
{root_dir?} (string|fun(filename:string,default:fun(filename:string):string|nil):string|nil)
324+
The directory to use for the attached LSP.
325+
Can be a function, which may return nil if no server should attach.
326+
The second argument contains the default implementation, which can be used for fallback behavior.
327+
{lspmux?} (rustaceanvim.lspmux.Opts)
328+
Options for connecting to lspmux.
329+
330+
331+
rustaceanvim.lspmux.Opts *rustaceanvim.lspmux.Opts*
332332

333333
Fields: ~
334334
{enable?} (boolean)
335-
Whether to enable ra-multiplex auto-discovery.
335+
Whether to enable lspmux auto-discovery.
336336
Default: `true` if `server.cmd` is not set, otherwise `false`.
337-
If enabled, rustaceanvim will try to detect if an ra-multiplex server is running
337+
If enabled, rustaceanvim will try to detect if an lspmux server is running
338338
and connect to it (Linux and MacOS only).
339339
If auto-discovery does not work, you can set `server.cmd` to a function that
340340
returns an LSP RPC client factory (see |vim.lsp.rpc.connect|).

doc/tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ rustaceanvim.executor_alias rustaceanvim.txt /*rustaceanvim.executor_alias*
3333
rustaceanvim.intro rustaceanvim.txt /*rustaceanvim.intro*
3434
rustaceanvim.lsp.ClientOpts rustaceanvim.txt /*rustaceanvim.lsp.ClientOpts*
3535
rustaceanvim.lsp_server_health_status rustaceanvim.txt /*rustaceanvim.lsp_server_health_status*
36+
rustaceanvim.lspmux.Opts rustaceanvim.txt /*rustaceanvim.lspmux.Opts*
3637
rustaceanvim.mason mason.txt /*rustaceanvim.mason*
3738
rustaceanvim.neotest rustaceanvim.txt /*rustaceanvim.neotest*
38-
rustaceanvim.ra_multiplex.Opts rustaceanvim.txt /*rustaceanvim.ra_multiplex.Opts*
3939
rustaceanvim.rustc.Opts rustaceanvim.txt /*rustaceanvim.rustc.Opts*
4040
rustaceanvim.server.status_notify_level rustaceanvim.txt /*rustaceanvim.server.status_notify_level*
4141
rustaceanvim.test_executor_alias rustaceanvim.txt /*rustaceanvim.test_executor_alias*

lua/rustaceanvim/config/check.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ local M = {}
1919
---@return string|nil error_message
2020
local function validate(name, value, validator, optional, message)
2121
local ok, err = pcall(vim.validate, name, value, validator, optional, message)
22-
return ok or false, 'Rocks: Invalid config' .. (err and ': ' .. err or '')
22+
return ok or false, 'rustaceanvim: Invalid config' .. (err and ': ' .. err or '')
2323
end
2424

2525
---Validates the config.

lua/rustaceanvim/config/init.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ vim.g.rustaceanvim = vim.g.rustaceanvim
197197
---The second argument contains the default implementation, which can be used for fallback behavior.
198198
---@field root_dir? string | fun(filename: string, default: fun(filename: string):string|nil):string|nil
199199
---
200-
---Options for connecting to ra-multiplex.
201-
---@field ra_multiplex? rustaceanvim.ra_multiplex.Opts
200+
---Options for connecting to lspmux.
201+
---@field lspmux? rustaceanvim.lspmux.Opts
202202
---
203203
---Setting passed to rust-analyzer.
204204
---By default, this is a function that configures rust-analyzer
@@ -230,11 +230,11 @@ vim.g.rustaceanvim = vim.g.rustaceanvim
230230
---
231231
---@see vim.lsp.ClientConfig
232232

233-
---@class rustaceanvim.ra_multiplex.Opts
233+
---@class rustaceanvim.lspmux.Opts
234234
---
235-
---Whether to enable ra-multiplex auto-discovery.
235+
---Whether to enable lspmux auto-discovery.
236236
---Default: `true` if `server.cmd` is not set, otherwise `false`.
237-
---If enabled, rustaceanvim will try to detect if an ra-multiplex server is running
237+
---If enabled, rustaceanvim will try to detect if an lspmux server is running
238238
---and connect to it (Linux and MacOS only).
239239
---If auto-discovery does not work, you can set `server.cmd` to a function that
240240
---returns an LSP RPC client factory (see |vim.lsp.rpc.connect|).

lua/rustaceanvim/config/internal.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ local RustaceanDefaultConfig = {
288288
---@type nil | string | fun(filename: string, default: fun(filename: string):string|nil):string|nil
289289
root_dir = nil,
290290

291-
ra_multiplex = {
291+
lspmux = {
292292
---@type boolean
293293
enable = vim.tbl_get(rustaceanvim_opts, 'server', 'cmd') == nil,
294294
---@type string

lua/rustaceanvim/health.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ function health.check()
236236
end,
237237
},
238238
{
239-
name = 'ra-multiplex',
239+
name = 'lspmux',
240240
get_binaries = function()
241-
return { 'ra-multiplex' }
241+
return { 'lspmux' }
242242
end,
243243
is_installed = function(bin)
244244
local success = pcall(function()
@@ -249,7 +249,7 @@ function health.check()
249249
is_optional = function()
250250
return true
251251
end,
252-
url = '[ra-multiplex](https://github.com/pr2502/ra-multiplex)',
252+
url = '[lspmux](https://codeberg.org/p2502/lspmux)',
253253
info = 'Multiplex server for rust-analyzer.',
254254
},
255255
{

lua/rustaceanvim/lsp/init.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,14 @@ Starting rust-analyzer client in detached/standalone mode (with reduced function
209209

210210
local rust_analyzer_cmd = types.evaluate(client_config.cmd)
211211

212-
local ra_multiplex = lsp_start_config.ra_multiplex
213-
if ra_multiplex.enable then
214-
local ok, running_ra_multiplex = pcall(function()
215-
local result = vim.system({ 'pgrep', 'ra-multiplex' }):wait().code
212+
local lspmux = lsp_start_config.lspmux
213+
if lspmux.enable then
214+
local ok, running_lspmux = pcall(function()
215+
local result = vim.system({ 'pgrep', 'lspmux' }):wait().code
216216
return result == 0
217217
end)
218-
if ok and running_ra_multiplex then
219-
rust_analyzer_cmd = vim.lsp.rpc.connect(ra_multiplex.host, ra_multiplex.port)
218+
if ok and running_lspmux then
219+
rust_analyzer_cmd = vim.lsp.rpc.connect(lspmux.host, lspmux.port)
220220
local ra_settings = lsp_start_config.settings['rust-analyzer'] or {}
221221
ra_settings.lspMux = ra_settings.lspMux
222222
or {

0 commit comments

Comments
 (0)