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!
@jakewies3 жыл бұрын
@Kentosi people helping people! That's what it's all about :D Glad to have you!
@ultrat00n3 жыл бұрын
This is really a good video, this took me a few minutes to find.
@yaap7772 жыл бұрын
Perfect, simple, and useful video. Thanks a lot.
@jj0b3 жыл бұрын
Loving this series! Thank you! Keep it up!
@jakewies3 жыл бұрын
Thanks Jason!
@maddison02 жыл бұрын
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.
@sibouras7923 жыл бұрын
looking forward to the next videos, please cover treesitter and lsp as well
@jakewies3 жыл бұрын
Glad you are liking it! LSP and TreeSitter are definitely on the list of topics to discuss :D
@MrKristian2522 жыл бұрын
Very informative, thank you! Would be interested to hear if you have switched to packer?
@jakewies2 жыл бұрын
I have switched to packer. Seems like the. go to plugin manager for neovim right now.
@mosslnnx3 жыл бұрын
Thanks Jake , 👍
@jakewies3 жыл бұрын
No problem!
@willernst3 жыл бұрын
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.
@jakewies3 жыл бұрын
Hey Will thanks for the reply! So you're saying that putting your plugin configs into the plugin/ dir has increased startup time? As I mentioned towards the end I am considering the plugin/ dir for plugin config and the lua/ dir for other stuff like settings, remaps, autocommands, utilities etc.
@willernst3 жыл бұрын
To make sure we're on the same page, it improved my startup time, meaning it started up faster. I forget what led my down this rabbit hole, I think it was either verbose git messages that pop up your editor or the zsh command to open the current command in the editor. Either way, it defaulted to vim, which now that I've adopted neovim entirely, was missing my bindings and plugins. But when I changed the editor to neovim the editor popup when from instant to a slight pause, so I started looking into profiling startup time and looking for optimizations. By moving my configs to implicit loading in the plugin directory I was able to factor out a number of require statements and it ended up decreasing the startup time by about 1/8th of a second. Trivial, sure, but it was about a 30% improvement for these quick, brief loads.
@glidersuzuki55723 жыл бұрын
The issue here is that, if you want to not load a plugin config, then you have to move that file from plugin directory. When placing them in lua folder (or anywhere else) you can just comment out that line. This becomes harder when you have have plugins.
@willernst3 жыл бұрын
@@glidersuzuki5572 That hasn't been too bad. I've just changed the file extension and that disables the loading. It's not as convenient or visable as commenting out a requires statement though, and I'm honestly not a big fan of the "spooky behavior". I want to do some more profiling to see what the gains really are here and if it's worth it. Maybe I'll use some checks to load a lighter config when I want the quick, instant load editor.
@glidersuzuki55723 жыл бұрын
@@willernst yes, you can change the file extension to anything other than .vim or .lua but I still find it a hassle. I have too many plugins, 40+
@glidersuzuki55723 жыл бұрын
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.
@jakewies3 жыл бұрын
Great point!
@DebajyotiDutta3 жыл бұрын
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('')" statement, I am getting error while sourcing the init.vim file... Error detected while processing C:\Users\ddutta8\AppData\Local vim\init.vim: 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
@Jagddis2 жыл бұрын
I got the same
@Jagddis2 жыл бұрын
try this brew install luajit
@NostraDavid22 жыл бұрын
Does nvim not come with luajit?
@ggtt25703 жыл бұрын
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?
@jakewies3 жыл бұрын
Yup LSPs are on the roadmap! Glad you are enjoying :D
@ggtt25703 жыл бұрын
@@jakewies Thank you, just fyi, I sorta got clangd working with lua snip, but it the intellisense only clicks in when I toggle the autocomplete menu and then goes off again once I start making changes. Do you know what might be causing this? For reference, I've pretty much directly copied your config from the article. I can't find any resources and the documentation is exceptionally non comprehensive for a novice like myself.
@girirajrdx72772 жыл бұрын
It followed this…..but when try to use telescope…it says it is not a editor comand
@wijaksanapanji3 жыл бұрын
letsgoooooo!!!!!
@boole_cat2 жыл бұрын
I suffered for almost 2 weeks, it didn’t work, your tutorial helped
@freemti62 Жыл бұрын
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
@larrysaul37952 жыл бұрын
what would happen, if i have both init.lua and init.vim under ~/.config/nvim ? which one would work.
@NostraDavid22 жыл бұрын
Could be it tries to run both. If so, no clue which order it would go in.