Rust-analyzer has began using CPU in the background. It doesn't do it immediately, but if I leave VSCode open, then I notice that in hour or so, it will start to use 5-10% of CPU just by doing nothing. I have to restart the VSCode to get it to behave.

#Rust #RustAnalyzer

today i discovered the best and probably most useless feature of #rustanalyzer: “view crate graph”
I really wish there was a way to filter "find references" in #rustanalyzer to only positive (application) or negative (pattern) uses

M-. is so ossum, it never occurred to me to try something else!

https://oylenshpeegul.gitlab.io/blog/posts/20250601/

#Emacs #Eglot #RustAnalyzer

Go to definition in Emacs

Today, I was reading Why Use Structured Errors in Rust Applications? and one of the issues discussed is jumping away from the code you're working on to look at the definition of the error. On the one hand, rust-analyzer makes it really easy to jump to the error, but on the other hand they felt that they sometimes had to do so unnecessarily. In the comments on lobste.rs, matklad mentioned that he recently adopted the habit of splitting the screen first and going to the definition in the split (in Emacs terms, in the other window).

The unsynn! macro turns out to become a #rustanalyzer stress test 🤔 #rustlang

The code is fine, compiles as intended. R-A doesn't agree.

@counterVariable
5. Notice line no(s). 14, 15, 16. If you use `nvim-navic` or `barbecue` for winbar then don't need to tinker it. Otherwise you can remove it.
6. `codelldb` for rust, is recommended if you use debugger and have a setup.

#neovim #rust #rustaceanvim #rustanalyzer #dap #codelldb #lazy #mason

@counterVariable
3. Do not setup LSP with rust-analyzer beforehand, rustaceanvim will do it for you.
4. Look at line no. 5, since, you probably didn't/haven't setup any `settings.lua` file to manage macro Neovim settings. Replace the line with `enabled = package.loaded["rust-analyzer"] ~= nil`. This way rustaceanvim will only work when rust-analyzer is available. If you don't care about it remove line no. 5 completely.

...

#neovim #rust #rustaceanvim #rustanalyzer #dap #codelldb #lazy #mason

@counterVariable Yea, I have something that works.

NOTE : I've made few assumptions :
1. You use Lazy as package manager.
2. You use Mason.

There are few things that you need to keep in mind :
1. My path for this file in my config is -> `lua/plugins/intellisense/languages/rust.lua`. But you can put this file anywhere within the `plugins` directory.
2. You need rust-analyzer for rustaceanvim to work.

...

#neovim #rust #rustaceanvim #dap #rustanalyzer #codelldb #lazy #mason

@stevenaleach Hey 👋. Do you have any guide on how to start with #rust ?

#neovim #rustanalyzer #rustaceanvim