Setting up Sublime Text: general UI and settings for Rust development

Поділитися
Вставка

КОМЕНТАРІ • 16

  • @thelonelyking9904
    @thelonelyking9904 2 роки тому +1

    Thank you for this.

  • @dibyojyotibhattacherjee897
    @dibyojyotibhattacherjee897 2 роки тому +1

    THANKS A LOT!, It would be really helpful if u do a series on how to get started with embedded dev in rust, like with very very small projects...

    • @embedded-rust
      @embedded-rust  2 роки тому

      Hi, thank you fro the feedback. I made this video as a result of someone asking for it from my rust embedded series: ua-cam.com/play/PLWf59aJ8RCttoERQlw8VEM1xweGJKeaEI.html
      Is this what you were thinking or are you looking for something else (e.g. something more practical/finished than just individual pieces and sensors)?

    • @dibyojyotibhattacherjee897
      @dibyojyotibhattacherjee897 2 роки тому

      @@embedded-rust something more low key...

    • @embedded-rust
      @embedded-rust  2 роки тому

      @@dibyojyotibhattacherjee897alright, I will see what I can do. Any specific hardware?
      I would also recommend docs.rust-embedded.org/book/ as a starting point.

    • @dibyojyotibhattacherjee897
      @dibyojyotibhattacherjee897 2 роки тому

      @@embedded-rust Thanks a lot, umm for example soil moisture sensor ig!

    • @embedded-rust
      @embedded-rust  2 роки тому

      ua-cam.com/video/Xnl2ztQHGH4/v-deo.html covers analog sensors including trying out a soil moisture sensor. Calibrating seems to be the more painful part for those.

  • @stysner4580
    @stysner4580 Рік тому

    For me (non-nightly) everything works; but I don't get the "type labels" (the boxes after a type that you haven't declared explicitly that tells you the type). Any idea why? I can't seem to find a setting for it...
    For clarity: what I mean is if you type:
    let x = 5;
    there will be a little box after x with [: i32], but it doesn't show up for me. Autocomplete and all the rest works fine though...

    • @embedded-rust
      @embedded-rust  Рік тому +1

      I believe rust moved enough that what was `nightly` for me previously is now stable (or stable may even be newer currently).
      Regarding the type showing, I believe rust-analyzer should have this support:
      rust-analyzer.github.io/manual.html#inlay-hints
      however I am unsure if that works in sublime text out of the box. I have switched plugins a quite a bit and am currently using vscode because it seems to work more out of the box.

    • @stysner4580
      @stysner4580 Рік тому

      @@embedded-rust Inlay hints, didn't even know that term. Searching through the LSP settings using "inlay" immediately showed me they are disabled by default.
      Thank you!

  • @dibyojyotibhattacherjee4279
    @dibyojyotibhattacherjee4279 2 роки тому

    Btw, haven't u ugraded sublime text from 3 to 4....

    • @embedded-rust
      @embedded-rust  2 роки тому

      Hi, as far as I am aware I am on sublime text 4, just most plugins say "3" and are compatible.
      Oddly enough, "help" does not give me the version just build, I assume that 4126 I have currently is sublime text 4. You did make me quite curious :)

    • @dibyojyotibhattacherjee4279
      @dibyojyotibhattacherjee4279 2 роки тому

      @@embedded-rust yes, since for sublime text4, there's no headache of installing the nightly toolchain and then installing the rust analyzer and shit, u just have straight install some plugins....

  • @ctnguyenvn
    @ctnguyenvn Рік тому

    Does support for auto format rust? how to config if yes

    • @embedded-rust
      @embedded-rust  Рік тому

      I generally run `rust fmt --all` from the terminal

    • @fotisgimian4258
      @fotisgimian4258 Рік тому +1

      @@embedded-rust I actually suggest adding the following LSP setting to automatically format on save 😊
      "lsp_format_on_save": true