Rust Toggle End Of Lines - Rust10x VSCode Extension

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 12

  • @irlshrek
    @irlshrek 7 หลายเดือนก่อน +1

    JC IS A LEGEND! I don't use vscode but I'll turn this into neovim mappings. Great idea!

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน

      Thanks. Make sure to look at the latest main branch; I just removed some dead code.
      Also, one thing I might add in the next release is an `eol_cycle` command, which will cycle through those endings. This might be a good alternative binding to `cmd + ;` for some.
      By the way, if you are making a public extension for neovim for Rust, I am more than happy to add a link in the readme.

  • @Boronesss
    @Boronesss 7 หลายเดือนก่อน +3

    just one of the best rust content creator! really like your content.

  • @LucasOe
    @LucasOe 7 หลายเดือนก่อน +2

    Wouldn't it make more sense to have it cycle through the options? Maybe have one keybind to toggle the await and one to toggle the questionmark. Or one command that cycles through all four.

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +2

      Funny, this was my next feature I was going to add the ‘eol_cycle’ for the ones that prefer to bind this one.

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +2

      Btw, I like your idea of some ‘eol_toggle_question’ and similar for await. I might add those as well.

  • @codeitlikemiley
    @codeitlikemiley 7 หลายเดือนก่อน +4

    i believe it is possible to make it just use one single key press e.g. cmd + ; then properly parse the method signature , so if it is a async with result then it would have .await?;

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +1

      Yes, that would be cool, but in practice, it might be tricky, especially to find the function.
      1) We could do it the "cheap way," like a text/regex way, but this will become computationally heavy as the code grows.
      2) We could piggyback on rust-analyzer if they have an API for that, but this could also be quite complex.
      And at the end, we still have to toggle the ? on/off, as sometimes users might want the Result for some matching.

  • @zaafhachemrachid1701
    @zaafhachemrachid1701 7 หลายเดือนก่อน +1

    thx for all hard work

  • @michaelheinrich5219
    @michaelheinrich5219 7 หลายเดือนก่อน

    Nice extension, greatly appreciated!

  • @endogeneticgenetics
    @endogeneticgenetics 7 หลายเดือนก่อน +1

    Oh my gosh, that’s so nice!

    • @JeremyChone
      @JeremyChone  7 หลายเดือนก่อน +1

      I just added a eol_comma as well.