Let's create a Neovim plugin using Treesitter and Lua

preview_player
Показать описание
In this video I create a Neovim plugin called 'treesitter-unit' using Lua.
You can find the final plugin here:

Note: The `delete` and `change` functions are not necessary as we can just use operator-pending mappings.

Contact:

#neovim
#vim
Рекомендации по теме
Комментарии
Автор

Echo on what a brilliant, succinct and clear tutorial on vim scripting with Lua and plugins. Big fan of your 'Vim over VSCode' view and your videos are pure gold for my vimification. Thank you for your effort.

baobaobiz
Автор

I was overwhelmed with lua, vim apis and got stuck for days. This video is pure gold for me. Thank you so much for the video. Helped me tons.

rahulmysore
Автор

while I understand that this is very niche content but nonetheless so undervalued. It is sad that there are some meaningless videos that generate millions of views while this kind of materials barely gets to one thousand. Thank you David, your time spent on this is well appreciated!

jimshtepa
Автор

This is so great. Thank you so much! Super helpful.

mikepinge
Автор

Amazing video, I wish I could have watched it the first time I got to work with treesitter

Echiduna
Автор

How do you get autocompletions for nvim-treesitter? I have "nvim_lsp" and "nvim_lua" as cmp sources, but I do not get the list of functions like you do.

pierregoutheraud
Автор

For those of you coming to the video and having problems due to treesitter-unit module not being found, and checking that the path set with the `set rtp=./` is not in the runtimepath, that maybe due to any of your plugins overwritting the rtp after that command is executed (since any command executed using `--cmd` is executed _before_ the main neovim config)

In order to get around that, you should invoke nvim with `+set rtp+=./` since this is executed _after_ the main neovim configuration is ran.

chibbyne
Автор

Thanks for another straight-forward video on making Neovim plugins.

I just have two quick questions:
1. Is there an easier way to reload the plugin without having to quit and reopen Neovim?
2. Your README for the plugin changed from suggesting mappings for .delete() and .change() to all using .select() through xnoremap and onoremap. What was the rationale behind this? Should I not directly call .delete()?

jinhoyoon
Автор

Great tutorial!

Would it be much more difficult to implement custom text object and get not only select and delete, but also things like surround, toUpper or format for free?

BorisBrodski
Автор

Thanks for such a great Video ❤️❤️

But how can we apply yank on the node ? any idea ?

swastikacharyya
Автор

My runtimepath is not setting. What to do?

nshu
Автор

i need a video like : how to write telescope.nvim extensions (plugins)

ayoubelmhamdi