Friday, March 03, 2023

Re: [new] devel/rust-analyzer

Hi,

On Sat, 25 Feb 2023 10:40:48 +0100, Sebastien Marie wrote:

> On Fri, Feb 24, 2023 at 05:54:23PM +0000, Renato Aguiar wrote:
>> rust-analyzer is an implementation of Language Server Protocol for the
>> Rust programming language. It provides features like completion and
>> goto definition for many code editors, including VS Code, Emacs and
>> Vim.
>
> I am a bit surprised: it seems to me that rust-analyzer requires
> rust-src component to run (a rustup component).
>
> Does it is able to run without it ?

Yes, rust-analyzer can run without it but you need rust-src if you want to
have code completion via LSP for the Rust standard library.

Excerpt from the docs : https://rust-analyzer.github.io/
manual.html#toolchain

"Additionally, rust-analyzer needs the sources of the standard library. If
the source code is not present, rust-analyzer will attempt to install it
automatically."

> Does the version of rust-analyzer is decoupled from rustc version ?
> (rust-analyzer is also available in rustc tarball, and it is buildable
> while building rustc)

Yes, rust-analyzer is decoupled from rustc version : the project releases
a new version each week (latest version = 2023-02-27).

Laurent

No comments:

Post a Comment