ALL Code Editors NEED THIS Feature (Inlay Hints)

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024

Комментарии • 37

  • @paulzupan3732
    @paulzupan3732 Год назад +5

    Neovim built-in LSP has had support for inlay hints for as long as I can remember

  • @UsernameUsername0000
    @UsernameUsername0000 Год назад +23

    I’m pretty sure this has been in other JetBrains products like IntelliJ and Android Studio for years

    • @Indently
      @Indently  Год назад +6

      Looks like I'm late to the tea party as always

    • @conradboehnke
      @conradboehnke Год назад +4

      Yep, it's been there for ages... 😅
      I believe it exists since Kotlin's first stable release in 2016 or something like this as in Kotlin inline hints are pretty useful 😄

    • @Indently
      @Indently  Год назад +6

      I actually just went back to my earlier videos when I used Kotlin for Android. They were indeed there ahah. Just looks like I completely forgot about them.@@conradboehnke

    • @magnus9999
      @magnus9999 Год назад

      Rider also has this feature for some time

    • @conradboehnke
      @conradboehnke Год назад +1

      Yea haha no worries :D It's still a feature that every code editor needs lmao @@Indently

  • @sloan00
    @sloan00 Год назад +2

    How to enable inlay hints in VSCode: ctrl(cmd) + , > pylance > Analysis > Inlay hints

  • @murphygreen8484
    @murphygreen8484 Год назад +2

    Noticed it automatically enabled in my PyCharm recently. Really like it!

  • @spectrapulse2104
    @spectrapulse2104 Год назад +12

    vscode has had this for a while now but it's not enabled by default just like in pycharm and looks a little less nice (or at least in my editor with my theme)

    • @guanciottaman
      @guanciottaman Год назад +1

      It's enabled in Pycharm by default

    • @Lanxxe
      @Lanxxe Год назад +2

      How do you activate this?

    • @mabdurrafeyahmed9256
      @mabdurrafeyahmed9256 Год назад +2

      how to activate in vscode

    • @AWriterWandering
      @AWriterWandering Год назад

      @@mabdurrafeyahmed9256search for “Python inlay hint” in settings, and enable “Call argument names”

    • @AWriterWandering
      @AWriterWandering Год назад +1

      One nice feature of the VSCode implementation is that you can double click the hint to turn it into a keyword parameter.

  • @rkdeshdeepak4131
    @rkdeshdeepak4131 Год назад +1

    "If you are coding in vim it's irrelevant. If you would like to use powerful code editor.."
    Lol, Neovim lsp has builtin support for this, and coc plugin has supported this for a long time.

    • @Indently
      @Indently  Год назад +1

      Pardon my ignorance, but isn't Neovim a more powerful version of Vim? Or do you have all the same features that you have in Neovim?

    • @Indently
      @Indently  Год назад

      Maybe no one uses Vim by itself anymore, but if you can use Inlay Hints in Vim, I retract my statement :)

    • @sheep4483
      @sheep4483 Год назад

      @@Indently The main draw to Neovim is that you can use Lua to program plugins for it, which ends up being faster, and generally a better programming experience than Vimscript, and they have also been adding functionality that is only accessible to Lua based plugins, including the ability to use a real GUI rather than acting solely as a terminal program. But it also has Vimscript support and therefore can run any Vim plugin. The aforementioned CoC plugin happens to be in Vimscript, so it can be run by both, but for Nvim the built in Nvim LSP is preferred.
      People still use Vim because you still pretty much have all the practical functionality you would really be looking for, and the only thing you actually lose is maybe some technically unnecessary features behind the scenes, and some fancy features, but ultimately Vimscript can already be used to program pretty much anything, so user-side there's not really much missing. Many things from NVim have actually been incorporated into Vim, but there are still various things that are missing (perhaps most painfully Lua).

  • @PultsMoizer
    @PultsMoizer Год назад

    Yeah theyre great but like you alteady realised, not new xd. VS Code got Extensions for it, Visual Studio got them too and yeah, JetBrain Products overall too. So any User couls probably enable them

  • @123FireSnake
    @123FireSnake Год назад

    Recently? have they not had this for years now? Was that just IntelliJ that had it so far?
    But i do agree, every Code editor should have them, they are really usefull, not only for avoiding errors at coding time but also for understanding the code when you get dropped into a new project and need to understand what other people coded

    • @Indently
      @Indently  Год назад

      Apparently this is a recent update for Python devs 🤣

  • @alexh2665
    @alexh2665 Год назад

    I hope someone makes a vs code extension that gives us this feature

    • @LauPaSat-pl
      @LauPaSat-pl Год назад +1

      Look at other comments. It's already build-in

    • @alexh2665
      @alexh2665 Год назад +2

      @@LauPaSat-pl yeah I saw that but no one has said how to enable it since it isn’t a default setting other than on pycharm

  • @Cloudxxx23
    @Cloudxxx23 Год назад

    My pycharm community version does not have those except code vision, code author, Other, markdown.😏 bummer.

    • @Indently
      @Indently  Год назад

      You just have to update I think

  • @HeyZReD
    @HeyZReD Год назад

    Using positional arguments, instead of keyword arguments make code less readable, in my opinion.
    I think it makes the code sooo much easier to understand and code review when you have keyword arguments everywhere

    • @Indently
      @Indently  Год назад

      Personally I don't think that's a valid point to make in a video about inlay hints.
      I probably would not stop using keyword arguments because not all code editors support inlay hints, but inlay hints are literally implicit keyword arguments (only by look) so I don't understand how positional arguments would make your code less readable in any way if inlay hints are there.

    • @HeyZReD
      @HeyZReD Год назад +1

      @@Indently what i meant to say is that Inlay hints will make you use keyword arguments less. and i think keyword arguments are more readable (including outside of the code editor like a PR).