New Native Neovim LSP Inlay Hints (Nightly Build)

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

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

  • @cmdeckermusic
    @cmdeckermusic 28 วันที่ผ่านมา +1

    perf, that little snippet at 3:49 is just what i needed!

  • @ascourter
    @ascourter 11 หลายเดือนก่อน +10

    Good to see ya Elijah! Great video, looking forward to giving this a test drive. Also interested in a video on BOB!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +3

      Thanks man, appreciate you! And thanks for sharing your interest :)

  • @phaberest_
    @phaberest_ 11 หลายเดือนก่อน +9

    This is definitely going to be one of my favorite nvim as an IDE features!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Awesome, great to hear!

  • @starmechlx
    @starmechlx 9 หลายเดือนก่อน +9

    For anyone who followed this guide and had their stuff stop working on a newer nightly build, it looks like the api changed a little bit and now uses vim.lsp.inlay_hint.enable(). This is what I did to get it working again:
    if vim.lsp.inlay_hint then
    vim.keymap.set('n', 'nh', function() vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled(0)) end, { desc = "toggle inlay [h]ints" })
    end

  • @shivbhonde2389
    @shivbhonde2389 11 หลายเดือนก่อน +2

    Thanks so much !! Really loved that you even showed it for TS along with LazyVim config !

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Glad it was helpful!

  • @elithrade
    @elithrade 5 หลายเดือนก่อน

    Thank you for the video. Not only you explain what configs to change but also why and how to change them, it is really helpful to newbies like me to understand Neovim and lua.

  • @jizhang2407
    @jizhang2407 11 หลายเดือนก่อน +1

    The tutorial is perfect. I was able to follow it and get inlay-hints to work for lua, js and ts files (after correcting the typos in my config file). Thanks, again.

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Yay, glad it helped! Thanks for sharing

  • @ForeverZer0
    @ForeverZer0 11 หลายเดือนก่อน +5

    This seems pretty slick, and is one of those little details that is super helpful, but has been missing from nvim. I don't typically use nightly builds, so I will probably just wait until it hits release status (hopefully soon).

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Glad it was helpful! And yes, it can be handy for some code. I don't like having it on by default, but having a quick keymap to toggle it is sufficient for me, but some might choose to turn it on by default.

    • @AhmadMughal1
      @AhmadMughal1 8 หลายเดือนก่อน

      Any info on this yet ?

  • @worldxm
    @worldxm 11 หลายเดือนก่อน

    A very useful keymap. Thank you!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Glad it was helpful!

  • @noomondai
    @noomondai 11 หลายเดือนก่อน +1

    Thanks for the great vid Elijah!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Thanks, glad you enjoyed it!

  • @ninjarogue
    @ninjarogue 11 หลายเดือนก่อน

    Diggin the content! Surprised I never encountered your channel before.

  • @stoicfloor
    @stoicfloor 11 หลายเดือนก่อน +1

    can't wait for it to make it to stable!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Yes, not sure when v0.10 is planned for, but hopefully soon :)

  • @pascalallau1912
    @pascalallau1912 11 หลายเดือนก่อน +1

    Thank's, excellent video as usual and also interested in video on bob.👏

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Thanks! Been working on an outline for bob :)

  • @Redyf
    @Redyf 11 หลายเดือนก่อน +1

    Your videos helped me a lot, especially the ones about lazyvim

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      So glad, thank you for supporting the channel! Glad to get out another video. Hope you have a great rest of the week!

    • @Redyf
      @Redyf 11 หลายเดือนก่อน +1

      Thanks Elijah, have a great one too! 😄@@ElijahManor

  • @felipegutierrez2944
    @felipegutierrez2944 11 หลายเดือนก่อน +1

    Great content, I hope to see you more often!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Thanks, I hope you do too! 😀

  • @jizhang2407
    @jizhang2407 11 หลายเดือนก่อน +3

    Thanks for sharing. Yes, I'd like to learn how to use bob neovim version manager.

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Awesome, good to know. It has been really helpful for me to try out new things, but switch to other versions as needed

  • @darkarie
    @darkarie 11 หลายเดือนก่อน +14

    It would be really helpful if you add a git gist with all the code of the config.

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +4

      Doh, was in such a hurry to get it out I missed that. Thank you for bringing it up!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +12

      Here you go :) gist.github.com/elijahmanor/8a51534e108c96db740a2e93f9310cce

    • @darkarie
      @darkarie 11 หลายเดือนก่อน +3

      @@ElijahManor Thanks! That was quick.

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

    I love neovim, I just don't love trying to debug with it. Especially something like React Native. These inlay hints will help to read the new codebase at least, thanks :)

  • @chyldstudios
    @chyldstudios 11 หลายเดือนก่อน +3

    nice!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Thank you! Hope you find it helpful

  • @masko0921
    @masko0921 11 หลายเดือนก่อน +1

    This feature will be very helpfull

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Yes, it has been fun to use!

  • @farzadmf
    @farzadmf 11 หลายเดือนก่อน +1

    Great one, thank you!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Glad you liked it!

  • @aquepaique
    @aquepaique 11 หลายเดือนก่อน

    Thank you so much.
    One thing I found and it's very useful is this snippet that starts inlay hints automatically if your server has inlay hints capacity available:
    ```lua
    -- inside on_attach LSP function:
    -- ...
    if client.server_capabilities.inlayHintProvider then
    -- vim.api.nvim_set_hl(0, "LspInlayHint", { fg = "#747D83", bg = "#333232", italic = true }) -- Change inlayhints colors
    vim.lsp.inlay_hint(0, true)
    end
    ```

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Nice, yeah I didn't cover custom highlighting... good tip.
      And good snippet for turning it on all the time. I hinted at it (pun intended) that LazyVim was doing that, but I didn't show the code (although maybe I should have) github.com/LazyVim/LazyVim/blob/a72a84972d85e5bbc6b9d60a0983b37efef21b8a/lua/lazyvim/plugins/lsp/init.lua#L127
      Thanks for watching and the comment!

  • @mainendra
    @mainendra 11 หลายเดือนก่อน +1

    BOB 🙌

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      I'll start planning an outline. Thanks for the interest!

  • @bassamsaleh8034
    @bassamsaleh8034 11 หลายเดือนก่อน +1

    this is nice feature. thanks for the video. also interested in BOB the version manager :)

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Glad you liked it and thanks for the interest! I'll need to plan an outline for that video. Seems to be of interest

  • @sebascm7278
    @sebascm7278 11 หลายเดือนก่อน +1

    Awesome. Thank you!!!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      You are so welcome! Thanks for watching!

  • @chaitany.a
    @chaitany.a 11 หลายเดือนก่อน +1

    This have been in neovim for a couple of months now, and Intellij just announced this feature XD XD

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      It's been rolling out to numerous editors recently. Can be very handy

  • @JohnCostanzo
    @JohnCostanzo 11 หลายเดือนก่อน +1

    Awesome video. I wonder what is your daily driver for Neovim? Is your config based on Lazy or kickstarter? Maybe you use both since you have that script that you choose which one

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Over the years I first started with my own config, then I switched to kickstart.nvim for a while, then I switched to LazyVim. For my primary for work at my day-job I use LazyVim, however, when I'm playing around with concepts on side projects or for TH-cam I flip between kickstart.nvim and LazyVim to make sure concepts work for both. I like the simplicity of kickstart.nvim and how close it is to a bare bones config.

  • @n0kodoko143
    @n0kodoko143 11 หลายเดือนก่อน

    Sweet 🎂!!

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Thank you 😋

  • @VovaY
    @VovaY 11 หลายเดือนก่อน +1

    Elijah has returned! The inlay hint adds extra space at the beginning, any chance to remove it? What's the minimal version for this feature?

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Yay. Inlay Hints uses the "Virtual Text" feature of Neovim which is content that really isn't part of the buffer, so you can word hop over them (and skip over with motions)
      You currently need the nightly version of Neovim to use the feature. It will be part of the v0.10 release once it is launched.

  • @hechuan5075
    @hechuan5075 2 หลายเดือนก่อน

    wondering where you have gone, looking forwqrd to thr next video man

  • @AbrahamAlcaina
    @AbrahamAlcaina 11 หลายเดือนก่อน

    Configured, thank you really usefull

  • @priyamverma1975
    @priyamverma1975 8 หลายเดือนก่อน

    Hey there! Love your videos....is there any way you could share your kitty config??? :)

  • @achimdomma2171
    @achimdomma2171 11 หลายเดือนก่อน +1

    Thanks for the video! The activity / progress of your LSP is displayed as an overlay in the bottom right of your screen. Would you please tell me how to get that?

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +2

      Glad you liked it! The LSP progress is handled differently in kickstart.nvim and LazyVim. kickstart uses github.com/j-hui/fidget.nvim and LazyVim uses github.com/folke/noice.nvim and there is another option you could use called github.com/linrongbin16/lsp-progress.nvim

  • @VinitKhandagle
    @VinitKhandagle 3 หลายเดือนก่อน

    this is cool, btw what colorscheme is that

  • @neilkanakia
    @neilkanakia 11 หลายเดือนก่อน +1

    I'd love to see a video about the nvim version manager, also what's the best way to be on the latest version

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Awesome, started on an outline last night

  • @crowvampire
    @crowvampire 11 หลายเดือนก่อน +1

    this video is great, I wondering what tool do you use to show your terminal in that way

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      I'm using tmux if that is what you mean. I use the catppuccin plugin for tmux to make it look a bit better... github.com/catppuccin/tmux

  • @equu497
    @equu497 11 หลายเดือนก่อน

    Show us the Bob
    (Thank you for all you do for this community)

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Thanks for the support! Working on an outline now :)

  • @adam29334
    @adam29334 11 หลายเดือนก่อน +1

    Hello, what are your thoughts on the new "/pmizio/typescript-tools.nvim" plugin? A faster alternative to the classic tssserver?

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      I should look into it, but haven't really played with it. Have you used it?

  • @vikingthedude
    @vikingthedude 11 หลายเดือนก่อน +1

    How do the inlay hints affect vim motions like w, e, b, etc?
    Will they be skipped as if they aren't there?

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Good question. The inlay hints feature uses virtual text, so motions just are skipped over... it's like the hints aren't even there!

  • @brittager
    @brittager 11 หลายเดือนก่อน

    Yes, I want the Bob Neovim config manager video. Pleeeeeeease! 🙂

  • @RootsterAnon
    @RootsterAnon 10 หลายเดือนก่อน +1

    I see... I use AstroNvim so Shift+k is what serves me the most, but I see this as great addition to that.

    • @ElijahManor
      @ElijahManor  10 หลายเดือนก่อน +1

      Yup, LazyVim and kickstart.nvim both have that keymap setup too (capital K). Good to know AstroNvim has it as well. I mention the keymap at the 41 second mark. It is a very helpful keymap as you mentioned. Thanks for watching

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

    I don't have inlay_hint despite using sa,e version

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

    Which font you use, bro?

    • @user-ch8pg8ev2o
      @user-ch8pg8ev2o 7 หลายเดือนก่อน

      its jetbrains mono. but i also recomended use monaspace neon.

  • @michaelchen8949
    @michaelchen8949 10 หลายเดือนก่อน

    how will this perform with copilot?

  •  11 หลายเดือนก่อน +1

    Couldn't test it, apparently is messing the config of other plugins, but it is a cool feature

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      Hmm bummer, do you roll your own config or are you using some type of distro? Also, you'll need a nightly version for now until v0.10 is out (whenever that will be)

    •  11 หลายเดือนก่อน

      @@ElijahManor Nah, I'm downloading the github project and building it, I'm switching branches and testing, when I switch to the master branch it shows a warning about a deprecation from treesitter and nvim-ts-rainbow. But when I use the steps that you show in your video it screams error messages everywhere with other plugins, such as nvim-cmp for example. I switched to 0.9.2 because I care more for stability rather than bleeding edge. I'm using debian by the way

  • @p1mml
    @p1mml 11 หลายเดือนก่อน

    Nice, thanks! How do I setup the shortcut in LazyVim?

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      It's already setup! I meant to say that. Here is a link to the code github.com/LazyVim/LazyVim/blob/a72a84972d85e5bbc6b9d60a0983b37efef21b8a/lua/lazyvim/config/keymaps.lua#L116

  • @DartMitai
    @DartMitai 3 หลายเดือนก่อน

    not working flutter/dart

  • @Redyf
    @Redyf 11 หลายเดือนก่อน

    Can you make a new video about lazyvim 0.10?

    • @ElijahManor
      @ElijahManor  10 หลายเดือนก่อน +1

      Ah yes, you mean LazyVim v10.0.0? It is a very fast moving project github.com/LazyVim/LazyVim/blob/main/CHANGELOG.md
      I've been working on 2 other videos at various levels of completion, but I agree having a more up-to-date LazyVim video would be nice (or one that just covers the newest stuff from v10+).
      I'm tinkering with getting content ready for a Neovim v0.10 release as well (when it comes out) which is what I originally thought you meant when I first read your comment.
      Thanks for watching and for your continued interest :)

  • @neizvestniydrug
    @neizvestniydrug 4 หลายเดือนก่อน +1

    changed a bit again (neovim 0.10.0-prerelease): vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) -- toggle current buf, bool is the 1st arg

  • @devabdul
    @devabdul 11 หลายเดือนก่อน +1

    Anybody can help me to configure it for lunarVim

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน

      I don't use lunarVim, but it looks like this resource shows how you can configure a LSP www.lunarvim.org/docs/configuration/language-features/language-servers

  • @wh7988
    @wh7988 4 หลายเดือนก่อน

    that inlay hint looks disgusting, how can we do it rust style where it just lives on the right side without cluttering the screen

  • @matteostara
    @matteostara 11 หลายเดือนก่อน

    Loving your stock nvim! Moved in from LazyVim or just fun?
    P.S. can you share the kickstarter we see on the video 🙏😁

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Thanks! You can find kickstart.nvim here github.com/nvim-lua/kickstart.nvim It's a very streamlined config, a good starting point if you wanted to stay pretty light and maintain your own

  • @user-re8ht8ql5h
    @user-re8ht8ql5h 8 หลายเดือนก่อน +1

    The API has undergone similar changes. The interface has been changed from “ vim.lsp.inlay_hint” to “vim.lsp.inlay_hint.enable“.

    • @user-re8ht8ql5h
      @user-re8ht8ql5h 8 หลายเดือนก่อน

      10.8.1 (2023-11-30)
      Bug Fixes
      lsp: detect if using nvim-0.10 and use new inlay_hint.enable method (#2007) (6853b78)
      lsp: inlay hints on stable. See #2007 (e229988)
      ui: signcolumn signs on nightly. Fixes #2039 (11a8a6b)

  • @CarstenFuehrmann
    @CarstenFuehrmann 11 หลายเดือนก่อน +1

    Great video, thanks! However, this does not seem to work on September 23 with commit 93d27ea5 of the main branch built from source. There is no ":help" for "inlay_hint". Also, "vim.lsp.inlay_hint" does not exist. (However, a _field_ "_inlay_hint", note the underscore, does exist.) UPDATE: I works with commit c88bb65 that came as the nightly via Bob just few hours earlier. Strange...

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      Hmm odd, I've been using it for weeks. Not sure what was going on there. The following PRs added the functionality github.com/neovim/neovim/pull/23984 and github.com/neovim/neovim/pull/24074 Glad it's working for you now

  • @sinaebr7337
    @sinaebr7337 11 หลายเดือนก่อน +1

    wish there is a video and walk throught kickstart.nvim and add more feature to turn it into ide : )))
    ( i always have problem with adding folding in nvim distro that dont have folding as default )

    • @ElijahManor
      @ElijahManor  11 หลายเดือนก่อน +1

      I do have an old high-level walkthrough of kickstart.nvim, but it was before they switched to lazy.nvim. I've been toying around with a series of videos that shows features from a very basic level... like not using LazyVim or NvChad or things like that. I like kickstart.nvim because it's still pretty low-level and simple and a good place to build upon