I really wish there was a way to filter "find references" in #rustanalyzer to only positive (application) or negative (pattern) uses
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!
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 ?
But it already makes my fan spin blazingly fast!!
Finally i got #Embassy working on my #ESP32c6 in #NixOS. By now it should be over 95% reproducible. The last parts have to wait until i finished my day job.
The litte bugger now runs #EmbeddedRust #RustLang.
I will share the flake, which is mostly the oxilica/rust-overlay flake with the corrected toolchain and stuff like #RustAnalyzer and `cargo espflash`.
Ever wondered why the language server #RustAnalyzer isn't showing all errors, warnings and lints? ๐
This is especially an issue in #Rustlings where Rust-Analyzer only shows the diagnostics in some of the exercises.
Turns out, Rust-Analyzer uses `cargo check` under the hood which itself stops checking early unless you specify the `--keep-going` flag ๐๐ผ
This is fixed in Rust-Analyzer now ๐
https://github.com/rust-lang/rust-analyzer/pull/17561
Thanks to @veykril ๐ค
(re)installing rust-analyzer must be easy now, at least, for me. #emacs #rustanalyzer
(defun install-rust-analyzer ()
(interactive)
(shell-command "mkdir -p ~/.local/bin && \
wget -O - https://github.com/rust-lang/rust-analyzer/releases/latest/download/rust-analyzer-`arch`-unknown-linux-gnu.gz | \
zcat > ~/.local/bin/rust-analyzer && \
chmod 755 ~/.local/bin/rust-analyzer"))
After some time DuckDuckgoing about rust-analyzer and YouCompleteMe; At the end I applied a radical solution, kill the thingy when exit vim
autocmd QuitPre *.rs :!ps -ef | grep rust-analyzer | grep -v grep | awk '{ print $2 }' | xargs kill -s 9
@MoskitoHero Iโm wondering if it will eventually be possible to have a similar experience. Two hints about why: (1) #gitlab is working on something similar to copilot, but exposed as an LSP server https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp; (2) #helix supports multiple LSP servers since last version (so you donโt have to choose between #rustanalyzer and something else) https://helix-editor.com/news/release-23-10-highlights/#multiple-language-servers
how the fuck do you make #RustAnalyzer use the binyary at rustup which rust-analyzer
in #Rust in #VSCode? please boost i'm pulling my hair out
EDIT: solved! :3
you have to set rust-analyzer.server.path in settings.json
@imperio I've opened a feature request on the #RustAnalyzer repo:
https://github.com/rust-lang/rust-analyzer/issues/15948
Out of curiosity, what setup do you use for Rust development?
I'm running an inadvertent comparison of Zulip, Slack, and Discord tonight. I asked the same question (copy & pasted) about rust-analyzer, Neovim, and #[cfg(feature = "ssrโ)] attributes.
I'm curious to see which gets a response first, and which response is the most helpful.
rust-analyzer is getting "remove unused imports" feature soon! ๐ฆ
Out of #RAM , #swap full. What could be the reason? Did I go overboard with Firefox tabs? Too many QtCreators? A multitude of open consoles and documents?
Nope. It's stray #rustanalyzer processes eating 15GiB. Or maybe it's #kwrite's fault?
Had some fun on stream exploring #rustanalyzer through a GH issue: https://github.com/rust-lang/rust-analyzer/issues/13002
The developer guidelines/docs were nice and pragmatic, definitely worth a read: https://github.com/rust-lang/rust-analyzer/tree/master/docs/dev
The goal of the issue is to implement completions for extern crate names. I started out getting the completion to work with hardcoded suggestions, which works now. Next time we'll look at sourcing the correct suggestions.