Stream: t-compiler/rust-analyzer

Topic: Integration in custom editor (cpp)

Skytrias (Feb 08 2020 at 23:11, on Zulip):

Hey, fairly new here, wanted to know if there are any guides on how to set up rust-analyzer in non supported editors? I got rs_lsp_server.exe running, now i would have to make the client side integration in my custom editor work. problem is its c/cpp and documentation on lsp seems rather sparse.

Skytrias (Feb 08 2020 at 23:21, on Zulip):

i could probably call from c/cpp to a rust build dll and load the rust-analyzer example

matklad (Feb 09 2020 at 12:39, on Zulip):

90% features of rust-analyzer is vanilla LSP, so perhaps a better question to ask is "how do I get LSP support in my editor?".

The list of current implementations is here:

If you editor is missing, than implementing LSP using one of existing libraries would be the first step.

Skytrias (Feb 09 2020 at 13:16, on Zulip):

@matklad both links link to the same page if that was intended. RustLSP seems outdated, as the owner said in The cpp implementor doesnt have a lot of documentation quite sad

Skytrias (Feb 09 2020 at 13:18, on Zulip): seems to be missing a bit of stuff.
im wondering if i could use the rustlsp one and interop between cpp and the rust lib

matklad (Feb 09 2020 at 13:19, on Zulip):

right, the first one is supposed to be

matklad (Feb 09 2020 at 13:20, on Zulip):

My gut feeling that trying to use rust-lsp from cpp would create more problems that it would solve.

The base protocol is not that complicated, coding it by hand might be easier than depending on a dependecy

std::Veetaha (Feb 09 2020 at 17:52, on Zulip):


Last update: Jul 27 2021 at 22:15UTC