home.social

#rustanalyzer — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #rustanalyzer, aggregated by home.social.

fetched live
  1. Downgrading my #rust toolchain because of some nasty #rustanalyzer bug... makes me sad

  2. Forcing #Zed to use #beta of the #rust-analyzer for the project is neither trivial nor obvious. It by default calls stable rust-analyzer ignoring rustup's override for the project; on top of that installing rust-analyzer beta using #rustup is non-obvious and doesn't happen automatically with the override to the beta chanel to my disappointment.

    Fact #Zed doesn't handle environment variables in settings files doesn't help.

    #rust #rustlang #rustanalyzer

  3. 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

  4. today i discovered the best and probably most useless feature of #rustanalyzer: “view crate graph”

  5. @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

  6. @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

  7. @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

  8. 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`.

  9. Ever wondered why the language server isn't showing all errors, warnings and lints? 😕

    This is especially an issue in 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 😃

    github.com/rust-lang/rust-anal

    Thanks to @veykril 🤗

  10. CW: complaining about rust-analyzer

    ughhh it's annoying how #rust-analyzer just falls flat with bigger prelude imports like that of bevy

    like tbf my hardware isn't the best but i wanna be able to code effectively without my language server taking forever for everything

    i can see that huge preludes are complex, and that correct completion stuff would be hard for that but still

    it's annoying ><

    #rust

  11. 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

    #vim #rustanalyzer #youCompleteMe

  12. @imperio I've opened a feature request on the repo:

    github.com/rust-lang/rust-anal

    Out of curiosity, what setup do you use for Rust development?

  13. 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.

    #rustAnalyzer #Neovim #Rust

  14. Out of , 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 processes eating 15GiB. Or maybe it's 's fault?

  15. Had some fun on stream exploring #rustanalyzer through a GH issue: github.com/rust-lang/rust-anal

    The developer guidelines/docs were nice and pragmatic, definitely worth a read: github.com/rust-lang/rust-anal

    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.

    #rust

    youtu.be/hpMxG5h1Me8

  16. Does anyone know how to get my checkmarks to appear?

  17. CW: ChatGPT and other LLMs (long)

    I have very mixed feelings about #ChatGPT and related large language models (LLMs). They are certainly a cool tool, but I also currently don't believe that these "stochastic parrots" will easily replace search, article/paper writing, coding, and similar tasks. That is, they can be used to augment, but not replace those human activities - at least in the near future.

    One more specific example is #Github #Copilot: I am impressed by the code suggested with small "query blocks", either in the form of method signatures or even just comments. While I wouldn't ever just Tab-complete that code into a production codebase (and I hope others also shy away from it), using it as a smarter auto-complete can be a total time-saver. While still learning #Rust, I find it a great tool to provide me with correct syntax while I try to express the semantic concepts in my head. That is, the #VSCode + #Copilot + #rustanalyzer based workflow is a magnitude faster than what I can achieve, at my current level of competence with #Rust, with any other IDE.
    However, on the conceptual level, its suggestions range from spot-on (supposedly for parts that have been used in the same form in many Github projects already) to "terrible, awful, don't even think about it". Don't trust the concepts generated by #Copilot, but for getting a concept into correct syntax, it can be a great help.

    I find the same to be true of #ChatGPT: it produces correct (human language) syntax, but its concepts on a semantic level are more random than anything else. It doesn't have a reasonable world model, and without such a world model, even internal consistency of statements (let alone factual validity in alignment with what we consider the real world) is darn hard (impossible?) to achieve. It's currently a toy, and should only be used for toy purposes.
    On that note, the best use I could personally find for #ChatGPT is to reply to spammers, who operate on a comparable level of factual and consistent concepts (i.e., #BS): github.com/rmayr/chatgpt-email

    Maybe #ReinforcementLearning will at some point allow LLMs to be factually more accurate, including the ability to cite sources. I don't know, as I'm not an expert in this field. But the current #UnsupervisedLearning approaches with just scraping massive amounts of (syntax, but not semantic) web content seem fundamentally flawed to me.

    On a sidenote, if the #OpenAI mission is really to "ensure that artificial general intelligence benefits all of humanity", shouldn't the trained models be, erm, #open (source)? After all, the training data is publicly generated, so it seems more beneficial to humanity if the derivations are also #open for building upon them.

  18. Anyone had any luck getting `rust-analyzer` extension's intellisense to work in VSCode using a #Nix `flake` development environment?

    #VSCode #RustLang #Rust #Intellisense #RustAnalyzer #NixOS #Development #SoftwareEngineering #WSL2 #WSL