-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add support for ra-multiplex #631
Comments
@mrcjkb Wow, this was quick, thank you so much <3 I don't want to bother you with this further, but when I tested it on my machine, it works, but has this strange behaviour. I've noticed following in output in I haven't noticed this error when using local M = {}
M.init = function()
vim.g.rustaceanvim = {
server = {
on_attach = function(client, bufnr)
local lsp_map = function(mode, keys, func, desc)
vim.keymap.set(mode, keys, func, { buffer = bufnr, desc = desc })
end
-- rust-lsp mappings
lsp_map("n", "K", function()
vim.cmd.RustLsp { "hover", "actions" }
end, "Rust hover docs")
lsp_map("n", "J", function()
vim.cmd.RustLsp "joinLines"
end, "Rust join lines")
lsp_map("n", "<Leader>ca", function()
vim.cmd.RustLsp "codeAction"
end, "Rust Code action")
lsp_map("n", "<Leader>rca", function()
vim.cmd.RustLsp "explainError"
end, "Rust error explain")
lsp_map("n", "<Leader>ree", function()
vim.cmd.RustLsp "openDocs"
end, "Rust docs")
lsp_map("n", "<Leader>rem", function()
vim.cmd.RustLsp "expandMacro"
end, "Rust expand macro")
-- copy from lsp_config
lsp_map("n", "gd", vim.lsp.buf.definition, "Goto definition")
lsp_map("n", "gD", vim.lsp.buf.declaration, "Goto declaration")
lsp_map("n", "gI", vim.lsp.buf.implementation, "Goto implementation")
lsp_map("n", "go", vim.lsp.buf.type_definition, "Goto type definition")
lsp_map("n", "gr", vim.lsp.buf.references, "Goto references")
lsp_map("n", "ra", vim.lsp.buf.rename, "Rename")
end,
},
}
end
return M
|
oops 😅
I don't think that's anything to worry about. thanks for reminding me about that project btw 🙏 |
Once again, thank you for jumping on this so quickly it works perfectly now 🥳 |
Hi!
I cannot figure out how to make rustaceanvim work with ra-multiplex, and I'm not sure if something like this is even supported by rustaceanvim.
The way this is set up via regular LSP is as follows:
So I tried to mimic this using rustaceanvim:
But no luck; Even syntax isn't highlighted, and this is, I guess because I'm using
vim.lsp.rpc.connect
?I see in the
ra-multiplex
log that a connection is established, but apart from that, nothing.The
checkhealth
marks everything as OK.My question is, is it possible to use the
ra-multiplex
withrustaceanvim
at the moment, and if so, how?And if not, would you consider adding this in the future?
One of the most obvious benefits is the "startup time," i.e., when I'm working on my project, it takes even a couple of minutes (on my MBP M1 16GB RAM) to get "everything going" (i.e., I get syntax highlighting and output of
cargo check
immediately, but for "show definition" or "go to references" to work, it takes even minutes).The text was updated successfully, but these errors were encountered: