Skip to content

Commit f855920

Browse files
committed
feat(health): check for optional ra-multiplex dependency
1 parent 618f274 commit f855920

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

lua/rustaceanvim/health.lua

+22-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,8 @@ local function check_external_dependency(dep)
9494
end
9595
return
9696
end
97-
if dep.optional() then
98-
h.warn(([[
99-
%s: not found.
100-
Install %s for extended capabilities.
101-
%s
102-
]]):format(dep.name, dep.url, dep.info))
103-
else
104-
error(([[
97+
if not dep.optional() then
98+
h.error(([[
10599
%s: not found: %s
106100
rustaceanvim requires %s.
107101
%s
@@ -230,6 +224,26 @@ function health.check()
230224
end
231225
end,
232226
},
227+
{
228+
name = 'ra-multiplex',
229+
get_binaries = function()
230+
return { 'ra-multiplex' }
231+
end,
232+
is_installed = function(bin)
233+
if type(vim.system) == 'function' then
234+
local success = pcall(function()
235+
vim.system { bin, '--version' }
236+
end)
237+
return success
238+
end
239+
return vim.fn.executable(bin) == 1
240+
end,
241+
optional = function()
242+
return true
243+
end,
244+
url = '[ra-multiplex](https://github.com/pr2502/ra-multiplex)',
245+
info = 'Multiplex server for rust-analyzer.',
246+
},
233247
{
234248
name = 'Cargo',
235249
get_binaries = function()

0 commit comments

Comments
 (0)