How I Setup Neovim Plugins With Lua

preview_player
Показать описание
In this video I discuss my thought process when selecting and configuring Neovim plugins. There are a lot of ways to manage your setup - folder structure, naming conventions, etc. By no means is this the ONLY WAY, but it's how I currently do things. It will probably change in the future, but there is some good lessons to be learned in the meantime.

If this video helped you, or you have any questions / concerns, let me know in the comment section below! ⚡️

⏰ Timestamps

0:00 Introduction
1:24 Reviewing current setup
1:45 Neovim plugins vs Vim plugins
4:22 My approach for selecting plugins
5:53 How to configure Neovim plugins in Lua
16:54 Conclusion

📝 Show Notes

Neovim - Your First 15 Minutes

nvim-lua-guide

Neovim

vim-plug

My Neovim settings

Getting Started With Vim - A Practical Guide

👋 About Me

Hey there! I'm Jake. I make YouTube videos about all the cool things I learn in my pursuit to be a better software developer.

🐦 Connect with me on Twitter

💌 Subscribe to my Newsletter

Thanks for watching!
Рекомендации по теме
Комментарии
Автор

Great overview man. I was just re-arranging my plugins today and ended up on your website that eventually brought me here. Weird that you just a put out a video a few hours ago too. Subscribed!

KENTOSI
Автор

looking forward to the next videos, please cover treesitter and lsp as well

sibouras
Автор

12:27 It's worth noting the way Lua package caching works. If somewhere in your config you use `require"package.subpackage"` and somewhere else you use `require"package/subpackage"`, subpackage to effectively be loaded twice. This can be an issue if subpackage maintains some kind of state, you could end up with two separate copies of the state. This has happened to me before and caused some things to break, and it took forever to figure out what was wrong. It seems the best thing to do is always use ".", not "/", as your separator.

maddison
Автор

I recently spent a bit of effort optimizing my startup time and tried putting my various config files into the plugin directory, based on a Reddit comment to try to avoid using requires to load them. It shaved almost 150 ms off my startup time. I found this video while trying to find out if this was a bad idea for any reason as I don't see anyone doing it. It also solves the name collision issue without needing the namespace prefixing or extra directory depth.

willernst
Автор

Very informative, thank you!
Would be interested to hear if you have switched to packer?

MrKristian
Автор

There are many vim plugins that are useful. One is undotree, then there's vim-better-whitespace, vim-matchup, like that.
You can configure these plugins in lua. All vim options have lua alternative.

glidersuzuki
Автор

Loving this series! Thank you! Keep it up!

jjb
Автор

This is really a good video, this took me a few minutes to find.

ultratn
Автор

Hey jake, I love this series a lot. I checked out your very detailed article on this, but it was still fairly difficult to follow for me. I've only been able to configure telescope. I am so glad you're making these videos cause it really helps me out. Could you do LSPs next?

ggtt
Автор

Perfect, simple, and useful video. Thanks a lot.

yaap
Автор

I suffered for almost 2 weeks, it didn’t work, your tutorial helped

boole_cat
Автор

hi Jake, can you help me out .. I was able to install the Telescope plugin following you article but the moment I am introducing its configuration using the 'lua require('<namespace>')" statement, I am getting error while sourcing the init.vim file...

Error detected while processing
line 93:
E5108: Error executing lua [string ":lua"]:1: loop or previous error loading module 'iamdebajyoti'
stack traceback:
[C]: in function 'require'
[string ":lua"]:1: in main chunk

DebajyotiDutta
Автор

It followed this…..but when try to use telescope…it says it is not a editor comand

girirajrdx
Автор

well now I'm all confused, I was hoping for a guide to help me with my lua based nvim setup and plugins, but I stopped watching went you used vim-plug instead

freemti
Автор

what would happen, if i have both init.lua and init.vim under ~/.config/nvim ? which one would work.

larrysaul