New Native Neovim LSP Inlay Hints (Nightly Build)

preview_player
Показать описание
At the time of this video, the native Inlay Hints feature is enabled in the nightly version of Neovim. The feature will be part of the v0.10 release once it is available.

If you liked this video, please like and subscribe for further content.

00:00 Introduction
00:25 What are Inlay Hints?
02:17 Help for Inlay Hints
02:30 Ways to Get Buffer Handle
03:35 Create a Keymap for Easy Use
05:33 Inlay Hints for Lua in LazyVim
06:55 Inlay Hints for TypeScript in LazyVim
07:30 Conclusion

#neovim #lsp #inlay_hint #inlayhints #lazyvim
Рекомендации по теме
Комментарии
Автор

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

cmdeckermusic
Автор

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', '<Leader>nh', function() vim.lsp.inlay_hint.enable(0, not end, { desc = "toggle inlay [h]ints" })
end

starmechlx
Автор

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

ascourter
Автор

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

phaberest_
Автор

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.

elithrade
Автор

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

shivbhonde
Автор

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.

jizhang
Автор

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

stoicfloor
Автор

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 :)

TheStickofWar
Автор

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

pascalallau
Автор

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

ForeverZer
Автор

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

ninjarogue
Автор

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

Redyf
Автор

Great content, I hope to see you more often!

felipegutierrez
Автор

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 then
-- vim.api.nvim_set_hl(0, "LspInlayHint", { fg = "#747D83", bg = "#333232", italic = true }) -- Change inlayhints colors
vim.lsp.inlay_hint(0, true)
end
```

aquepaique
Автор

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

jizhang
Автор

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

darkarie
Автор

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

bassamsaleh
Автор

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

chaitany.a
Автор

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

hechuan