13
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rust-analyzer on Visual Studio Marketplace

Posted at

導入

alt
Rust のより良い IDE サポートを目指して開発が進められていた rust-analyzer が、Visual Studio Marketplace で公開されました 🎉
rust-analyzer は Rust (rls) よりも強力にコード補完してくれるので、Rust コーディングがかなり捗ります。

Windows 10, Ubuntu on WSL (Remote WSL), Linux Mint の3つの環境上で Visual Studio Code にインストールしてみましたが、自動的に ra_lsp_server をダウンロードしてくれることを確認しました。いままでは自分でビルドする必要がありましたが、かなり導入が簡単になりましたね。

ra_lsp_server がインストールされる場所が変更されたので、旧バーションはアンインストールしてからインストールした方が良いかもしれません。私は旧バージョンの rust-analyzer extension と~/.cargo/bin/の中の ra_lsp_server を削除してからインストールし直しました。

設定

rust-analyzer の欠点はめっちゃリソース(CPU, メモリ)喰います。私は CPU が ATOM で、メモリ 2GB のポンコツノート PC で rust-analyzer を使用していますが、actix-web、diesel 辺りを使ってプログラム組んでいると rust-analyzer がリソース喰いまくって Default 設定では重すぎてまともに動きません。なので下記の設定で運用しています。非力な PC で使われる方は試してみてはどうでしょうか。

settings.json
"rust-analyzer.lruCapacity": 64,
"rust-analyzer.enableEnhancedTyping": false,
13
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?