Auto-generated transcript Hello boys. Just making sure that everything in my stream is running perfectly. Okey dokey. Yeah, everything seems fine. Okay, so. Yeah, just like the title says, I'm going to go ahead and start learning NeoVim. Finally. So, if you've seen my previous videos, any of them really, you know that I always use Visual Studio Code. I still think it's the best IDE by far. I don't think we need to argue about that. I think Visual Studio Code is the best there is in the market. But, you know, there's always room for improvement. And we should always try new things and so on and so forth. Yada, yada, yada. long story short I'm going to try out NeoWim now I know this is really difficult to learn and set up so I also know that there are pre kind of NeoWim configurations like LazyWim and KickstartWim and others like that which basically just give you a complete IDE without you having to set up all the plugins and everything, right? But the problem there is that they just give it all to you so you can just get started, get up and running and build projects. That is great for productivity. It is not so great for learning NeoWim. And that is what I want to do. I want to learn what NeoWim is, how it works, and how I can turn it from a basic minimalist text editor into a completely full-featured IDE. Right? So, that's what I want to do. That's what we're going to learn. And in order to do that, we want to set up NeoWim from scratch. Now, yeah, my recording is fine. I have, where is it? Where's my terminal? I have WSL installed here. I use Debian. And all I'm going to do is install NeoWim over here. And we're going to set everything up over here and just figure out how we can use NeoWim. How we can set it up How we can install all the different plugins that we need And how we can write the configuration and so on and so forth like i never done this before so yeah we going to figure this out so the first thing i'm pretty sure i can just do pseudo apt install neo vim and that should work i think but let me confirm it so where's debian okay there we go apt install neovim right awesome so we just do this and this is going to install neovim and then we can see what comes next so i guess i should probably have some sort of an example project to build with this right some simple project that I built in NeoWim so I can just figure everything out. Or something like that, probably. I don't know. Yeah, let's wait for it to install. In the meantime, let's see. Setting up NeoWim from scratch Let find a good article or something and go through it and then let see I had to move to WSL. Yep, me too, my friend. Guys, completely off topic, but WSL is an amazing piece of technology, right? You have the best of both worlds if you use WSL. The only reason I really enjoyed using Linux so much is because it's just a superior programming environment right it is the best environment for programming that is the only reason i i enjoyed using linux so much i've obviously there is the customizing aspect there is the rising aspect but uh i've been through those those years before i've had my rising fun already now i just want something that works so i can get work done i can get shit done And Linux is just better for that. Now, the problem with just using Linux is there are also a couple Windows-specific apps that I use, stuff like my video editor and so on and so forth, right? There are some Windows apps that we just need, right? And they're never going to have any Linux alternatives, at least not as good as the original softwares, right? And so we do need both of these operating systems, and WSL just makes things so much better for us. us you have the best of linux for programming and you have the best of windows for all of your windows specific apps so the way i the way i um set this all whole thing up is i basically just do all of my programming in wsl all of the tools that i use like npm and so on and so forth python go and rust and everything else all of my programming tools and technologies are installed in wsl and this is where i do all of my programming and then in my regular windows i just do my other day-to-day tasks my video editing and so on and so forth right um anyway so we have new installed now so i can probably do this and type some stuff awesome um there we go so i do have some basic experience with using Vim motions because I have tried the Vim extension in Visual Studio Code over here. So I do have some experience with using Vim motions. So we're not going to have too much trouble with that. Obviously, the more you practice, the better you get. But yeah. What we need to learn is how to set this whole thing up So let start reading i guess installation already done this first steps okay from now on i assume we all in a unix based environment your config files will go into config dot config slash and vim okay so let's build this first there there we go see i do know how to exit from whim so where's my config folder um cd into home slash dot config slash new whim which doesn't exist yet okay go into config and create a new whim folder cd into it and let's see what is this after directory i don't know if we need that we need an init.lua file so all of the configuration for neo vim is done in these lua files lua is just a another programming language and i guess i'll be learning that as well at least in terms of configuring neo vim right so let see you have an init file this is probably the entry point to your configuration and then you have a Lua subdirectory I don know why we need that And then your custom name Again what is this supposed to be? Well, let's see. I'll let you research what the after directory does. No, man. Tell me what it does. I used nconf for your custom name because sometimes I'm a peculiar lack of imagination. What is nconf again? Is that... what is nconf? In-memory storage engine that store the nested json representation of the configuration. What? Why is this important? What are we doing over here? what does npm have to do with huh this makes no sense i think nconf is just a name for the directory that he used over here not a specific package or something right i hope because this means nothing um and everything under Lua slash nconc will be loaded when initializing NeoWim Okay. You don't have to use nconc. You can use whatever name pleases you. Yeah, see? So nconc over here is just a random word that he used. It's not exactly a package or whatever. Somebody's messaging me on WhatsApp. I'm going to ignore them. The stream is more important. The learning is more important. Okay, so we need all of this stuff. You can have multiple directories at this level if you deem it necessary. Just remember to require them all. Actually do it further down the path. Okay, got it. Got it, okay. So let's do this. In my init.lua file, what I'm going to do is require. we're going to say require and i guess i'll just call this font or config whatever right and then we can save and quit this and then we're gonna have um we're gonna have a lua directory and then can you use mkdir to create subdirectories as well like if i did this lua slash con what would it do yeah see it didn't work so i have to do this and then cd into it and then create the con and then it will work perfect so that works awesome now what's next now we need to create an init.lua inside this configuration directory as well so let's do that I'm going to say init.lua and oops okay module conf not found what the hell Okay. Is that supposed to happen? This is bad. Wait a second. Is it because I just haven't created this pile yet or something? Let's try this. Map leader And I want to set this to the tab key instead of the spacebar key so how do you represent tab in i can just write tab oh like this okay so angle brackets and then the tab keyword awesome so like this got it or i guess we also need to add the backslash maybe hmm okay let's just try this let's wait a second where did that come from um this will be tab there we go that's the map leader that i want to use and then what is all of these right i don't think we need to have all of these yet but now i'm just going to save and quit and there we go so this works and yeah awesome so we're not getting that configuration error anymore which means things should be fine now let keep reading I was told to set my leader key before loading any plugins and I did literally so I told you sometimes I not very imaginative and if you know of a better place to set it let me know in the comments Okay Okay. Okay. In the following lines I have called for three different files. lazynit.lua, z.lua, and remap.lua. Okay. plugin manager yeah we need to get that and comes with its own lazy folder where i have a file for each plugin we'll do that one last set has all my classic vim settings translated to lua and remap is self-explanatory let's get on with those okay for the last time remember you can name things however it pleases you here's the directory tree so far got it okay all right So we're already getting into some sort of complicated stuff here. Let's create set.lua. And then let's see what comes next after that. We're going to create set.lua. We're going to say... All of this stuff Holy shit That a lot I could just copy all of this but I kind of want to type it all on my own i do this a lot by the way like instead of copying all the code all i do is just i just um type it out by hand and this just helps me to learn and remember it better because i'm kind of just i don't know focusing on it more i don't know but yeah i'm going to type it all on my own This is gonna be a bit boring. Which is fine, because nobody really watches these streams anyway. So, yeah. Stop, tab, stop equals to ship width. You can have width with the ship key. That makes no sense either. Width equals to expand tab. I don't know what that does. smart indent and auto engine yeah we do need those things those are always useful to have smart tab yeah i can use that as well probably tab there we go list i have no idea what the list does but okay list characters i don't know what these do either but i am just gonna copy this part um wait a second i can't exactly paste oh i can awesome i thought i thought the whim clipboard and the operating systems clipboard are completely different but I guess I was wrong line numbers we obviously do need these as you can see right now I have no line numbers so that sucks relative numbers we probably need these as well because they just make whim motions a lot easier to use cursor line probably useful to have as well sign column I don't know what that does but okay yes one okay whatever that does scroll off again no idea what that does but okay show cmd again no idea what that does either swap file i don't think or okay yeah swap files we probably need those so if i remember correctly swap files are just to like for instance the computer shuts down or you lose your data in some way the swap files are one way to recover the code so yeah they're just there to recover the code basically and this guy set it to false i guess i can just set it to false as well we don't really need need them right now backup i don't know what that's gonna do but false um whim.option.undo dir why do you need a directory for undo that makes no sense but okay os.getend home and before anything else i need to get intellisense and syntax highlighting because this just sucks right now anyway slash dot config slash neo whim slash undo dir okay undo file equals true clipboard equals unnamed why do you need to have this over here HL search no idea what that does but true increment search is that the next one I don't know INC search through ignore case yeah that's That's definitely useful. True. Smart case, probably useful. Okay. Terminal GUI colors, probably true. Because this does look good, usually. I don't know what it's going to look like in NeoWim, but usually it looks pretty good. Show mode, false. I don't know what that does either. And what is this in the end? no automatic comment insertion what does this do web.cmd auto cmd file type i don't know this looks weird um there we go i'll just copy this and now we have this which means i should be able to go back to init and require this file now right i should be able to say um if i can type this there we go i should be able to say and contact set now right like this should work i think so something like this i should be able to do this now let see yeah there's a problem okay why is this not working and then dot lower and then set dot lower in the same place okay module not found why it is why is this not found let's ask jippity what's going on here because we need to fix this before we move any further right uh remove this i'll also probably give it my directory tree so it knows what's going on here uh that was not that was not a good idea why did i cd out of my file tree damn it um while processing okay okay oh wait instead of nconf it's supposed to be just conf Uh, Lua Khan. There we go. nwim init.lua This is not supposed to be nconc. This is supposed to be just conc. Okay. Perfect. Now. Okay. It still doesn't work. Wow. Okay. Attempt to index VIP. Oh. I probably misspelled wim over there. So set.lua. Yeah. Where is. Oh. There we go. There we go. Right here. So instead of VIP, it is VIM. VIM. Perfect. Save. And the open. Perfect. Now we have line numbers as well as everything else. See? Relative line numbers and so on and so forth. Perfect. So the configuration is working. The imports are working. I guess everything is working fine. Now we can move to the next step over here. Turn off the relative numbers when you're sharing a screen with a colleague. Most people don't use them and it muddies communication. Yeah, true. Relative numbers are very weird if you're not a Vim user. Like, nobody else uses these. I remember when I first tried out Vim, relative numbers seemed such a weird concept that I just couldn wrap my head around it right but when i actually started to use whim motions and like just use different um delete insert and other like whim motions where you need to use arrow keys and stuff to like um you know like if i want to if i have some i don't know i don't even know if i remember this completely but if I want to delete three lines up right I would do something like um d four and the up arrow key and it will just delete four lines above right so yeah that's the kind of stuff we need to know over here this is why relative line numbers are useful in terms of win win motions but anywhere outside whim relative line numbers are just weird honestly like you have no idea what they're even used for so yeah just a little insider's whim job i guess um hold on h and then the configuration name to get the documentation okay column name column h and let say expand tab and this will give us the help okay okay use the appropriate number of spaces to insert a tab four obviously right how much is this supposed to be this better be four okay quit that window all right manually create the undo dir and specify the path if you elsewhere okay so we need to create the undo dir which is going to be in where did i put it i put it in outside of this place in init.lua yeah i can't find it uh okay in nvim slash undo dir all right so we create that folder i guess which is going to be in here mkzer undozer file exists oh so i guess it probably just created it on its own right when i first ran this um neo vim with this configuration i guess it automatically created it for me all right what next um keymap and this is just a bunch of shortcuts I guess I don think we need to have these for now Because one, I don't understand what this is even doing. And two, I don't know the syntax for all of this. And three, we don't need any of this to get started. So I'm going to skip this part. But yeah. you know before i started this whole youtube thing i had no idea that speaking is so hard on your throat like i need to keep drinking water every 10 seconds but um what do we do next now syntax goes mode where we means visual and normal and so on you know there's like 17 different modes in vim or something most of which we don't even use like i don't know but there's a ton of different vim modes usually we only use visual insert normal um replace visual line there's that's another one and just yeah five or six different modes that's it we really don't need need to use any of the other ones um but yeah Okay, last block isn't really remapped. Okay, okay, we don't need to do any of these. Yeah, Primogen and TJ Degrees. These are two people who actually inspired me to start playing around with NeoWim and stuff. So, yeah. Yeah, and he's also part of the NeoWim development team. So, that's probably a good thing. I was lazy as my plugin manager. Okay, as for all the plugins to come, I recommend you to always check out the docs. there's more info in there than whatever i might get to explain here got it all right so let's get lazy as my um i guess plugin manager as well and then we can do everything else see this is the this is one of the things i don't like about neo vim it's because like there's you need to combine all of these different third-party plugins and like tools just to have a complete development environment which visual studio code gives us right off the bat right now yes you do need to use extensions for a lot of things but installing and configuring these extensions is so simple like you literally just open up the page click install and you done right but in neovim you have to just go through all of these different hoops like i know that each extension has its own configuration file that you need to write and you need to have all of these like configs for every single extension or third party tool you use and it's just a headache to use i think i don't know that that's just the i don't know the assumptions that i have in my mind right now but yeah we're using this for the first time and we'll see if it's actually like usable or not we'll see if if the if neowim is only used by nerds who have no life outside programming or actual normal people can actually use this we'll see so don't they have some sort of a installation section here or something how do i install this uh wait okay there we go installation there we go okay check out lazy for installation we'll do that awesome nasty sneeze okay okay echo sgd pad config what does this this do let's see open up neo whim okay so it just gives you the pad for your config okay easy all right so we get config.lazy first um which means that first i need to create um lua slash can't go into this directory and then create nvim or not create but go over here and actually require the file which is going to be conf.lazy there we go now we can save this we can create the actual lazy file lazy.lua and then we can open it up and now let's see so we have all of this code which I wonder what all of this does Make sure to set up map leader and map local leader before loading lazy so that mappings are correct. Okay so I don't know what this is all about but this is where we actually import lazy.envim. Got it. Map leader and map local leader. Why do you have two different leaders? that makes no sense anyway um local lazy pad vim.fn.std pad data dot dot slash lazy slash lazy dot and vim if not vim.uv or vim.loop .fsstat lazy path then local lazy repo equals https github.com lazy.nvim.git local out equals whim.fn.system git clone I guess this is going to run the command. Okay. Filter glob none branch stable. Obviously we don't want to get any cutting edge release that's not even tested yet or something lazy repo and then lazy path and close this okay and then if when dot V dot shell error equals zero then when dot API dot nvim echo fail to clone lazy.nwim and then a new line and then the actual error message which is going to be the standard output from the command And then a warning message Which is just press any key to continue I guess you need to exit okay there we go all right and got it perfect then vim.fn.get character whatever that does and then os.exit with one one is just a status code that tells you that program exited with an error right you'll probably like if you brand some sort of um programs in your in your terminal you've probably seen this before like program exited with status code one or status code zero and so on and so forth that's what that means okay Okay Wim Not pretend Prepent LazyPath Awesome So then we need to set up the map leaders which we already done in the actual init file And then we just set up lazy spec equals import plugins I guess this is where we actually import the plugins that we have Configure any other settings here. See the documentation for more details. Color scheme that will be used when installing plugins. Habba, Max, whatever that is. I hope that looks good because that's what I'm going to use for now. Color scheme. ProblemX. Okay. And then checker. Automatically check for plugin updates. Yeah. That's obviously going to be useful as well. We're going to enable that. There we go. Awesome. I think that's all we need. so let's save this and open up NeoWim and nothing happened okay something is broken let's see what happened over here so I'm pretty sure I copied everything correctly this is probably a syntax error because I haven used this language before Lazy Okay that was wrong Lazy Let just copy all of this And that was not what I wanted to do There we go that is also what i not wanted to do uh why is this not copying how do you copy something from whim copy huh but this is pretty cool i didn't know we could use a mouse in here apparently you can also use a mouse inside the terminal that makes no sense but yeah see there should be it should be a string but you're missing the opening quote oh okay over here got it so uh where am I okay there we go now it should be fine I think Now it's just a blank statement. No specs for found for module plugins. Okay. Go back over here. So this plugins is probably just a placeholder. I don't like probably just a placeholder. We need to actually install real plugins here. Probably. Plugin spec. Plugin URL. Okay. directory to a local plugin custom bit URL where the plugin is hosted name for the plugin okay okay okay okay let's just ask GPD how to set this all up okay yeah sure give me the plugins dot Lua example as well Oh, alright. Import plugins Oh okay So this plugins here is going to be a lua file again okay that makes sense i guess um so i guess we create a plugins file in here as well and save that and they should then return something which will be an object i guess and inside here we can actually get some plugins so what is tree sitter I know tree sitter is very very popular in the new them community but I don't know what it does parts a generator okay that makes no sense NeoWim. Does it just provide syntax highlighting and nothing else? Jumping to definitions, finding references. We do need those things, obviously. Okay so it probably useful to have this Let just grab it nvim slash nvim-free-sitter build equals ts-update and there we go. all right error again no specs found for module plugins okay let's see and let's also give it the directory 3 over here and let's see what the problem is. Oh, right, right. Cont.plugins. Got it. So just like we did it before, right? Down here it supposed to be Cont Okay Save that Open up plugins again and there we go so this is now installing something and it's broken again now that makes no sense um okay let's try check help lazy uh-huh lower rocks hero rocks what does any of this mean um let's just quit this whole thing for now um how do i how do i update all of my plugins Lazy NeoWim update plugins because clearly it didn't install fine right there was clearly an error over here so hmm How do I update all my plugins in lazy? Oh, okay. So run lazy update. Alright. So TreeSitter is installed, but I don't know if it's going to work. Let's open up any file. Lazy.google, for instance. Yeah, see? It didn't work. So there is an error over here. Error detected while processing bug. Read post auto commands. That makes no sense. What is going on over here? I'll just copy all of this and post it in here and try to understand what's going on. No parser for the... Oh, okay. So we do need to install parsers for different languages. All the common ones? Yeah, I probably need to get all the common ones because I work in so many different languages, right? Okay, so open up nvim again. cs install all And I guess we going to have to wait a bit until it installs all of them and then we see what comes next after this can't this give me like a progress bar or something oh there we go okay we should go I definitely use go a lot we're going to need this Yeah, it would be useful if it gave me some sort of progress bar, but okay. I guess we can make do with just these messages over here. In the meantime, you can make TreeSetter auto-install parsers. Ensure installed and highlight enable true. What does that do? Ensure installed. Okay. Yeah, I'll probably add this as well. Right, just as soon as this finishes, I guess. Kotlin? I don't need Kotlin. I guess this is going to install a ton of unnecessary syntax highlighting as well, which we don need but I guess it fine for now We can probably just uninstall these and make sure to only install the ones that we need like all of these over here but yeah Sure is taking its time. Yeah, most of these languages I'm not even going to use. So this is kind of useless, I guess. Super HTML, what is that? What is this? HTML language server and templating. Yeah, for some reason I thought this was a new HTML language. I guess not. Okay. Tmux. Yeah, Tmux is something I want to try out as well. Yeah. Stream is going fine as well. You can see I get zero views completely. Just me me and me The whole stream While this finishes, I'm going to take another water break. Okay, it's almost done. Come on, come on, come on, come on, come on. Almost done. Is it stuck? I think it's stuck. Why is it not done yet? Why is it not done yet? I think it's, oh, it is done. Okay. So it doesn't give you like a completed message or something. But now we should be able to open up any file and get syntax highlighting. There we go. Awesome. Which means I should also be able to have something like, close this, app.py. Let's say a Python application. and I have OS. I forgot how the commands work. Let's just create a function. Print. Hello. Yeah, see, we do get syntax highlighting here. Perfect. awesome okay so syntax highlighting works some of the configuration works we have not line numbers and everything okay uh my leader key the tab key that's not working yet so we need to fix that as well but yeah i think this is good enough for now to be honest i think this is enough neo vim for today i'm gonna end the stream over here and we're going to continue configuring this probably tomorrow and yeah we'll see how that goes i want to make this my default editor like my main code editor but that'll probably take a while to set everything up and stuff but yeah that's it for now and yeah stopping the stream