Debugging rust-analyzer + neovim -- extra `\` in trait methods

I have a pretty standard rust-analyzer + neovim setup. When I use the "Implement missing members" code action, it always includes a stray \ in the result:

fn from(value: Operation) -> Self {
    todo!()
\}

I'm sort of stuck in figuring out how to debug this -- lots of internal magic seems to occur in neovim, and further magic in rust-analyzer. I have a few other issues I'd also like to fix, so I'd appreciate some general debugging advice, although if there's a quick fix to this issue that's also great!

Setting RA_LOG=info gets voluminous output in the log file, but seemingly not helpful -- I don't see anything about add_trait_assoc_items_to_impl, nor any strings containing that todo!()

Make sure to update your neovim setup, this is a bug in neovim/lsp integration that I believe has been fixed there.

Indeed, it turns out I wasn't running Lazy sync, and rustaceanvim was 6 months out of date. Updating fixes the issue -- and perhaps the other issues that have been plaguing me, too?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.