Customizing LuaLine2:00
And then our scroll position and our cursor position. Now this is honestly excellent on its own, but lately I've preferred a more understated status line just to give more focus to the code. So let's look at how I customize LuaLine. Let's first go and remove this setup method, and we'll change this to be UserPluginsLuaLine. We'll save that, and then we'll go ahead and create that file in nvim-lua-user-plugins-lua-line.lua. So I'll paste this one in here, and let's save this file, and we should just be able to source this file on its own. And now we've got my status line. Now it's not quite right yet, because there's these little line breaks in there, so let's quickly go and fix those as well. I'm going to jump back to my plugins file, and let's come up to where we've got one dark, and we'll come down to the bottom here, and let's add in some more highlight information.
Adjusting Statusline Highlights2:44
I'm going to jump back to my plugins.lua file, and let's come up to where we've got one dark, and we'll come down to the bottom here, and let's add in some more highlight information. So in this case, I'm customizing the statusLineNonText. So there's a statusLine and a statusLineNonText highlight group, and the non-text one is meant to be more of an understated color, which is useful for these separators. And so these customizations will make the foreground the same as the non-text color, which is a very light gray, but importantly, it sets the background of my statusLineNonText to be the same as the background of my statusLine. So let's save this file, and we'll need to do a hacker compile to reload our plugins.lua file, and now those lines are much nicer. So let's jump back over to the configuration, and we'll quickly walk through it.
LuaLine Global Statusline3:28
and now those lines are much nicer. So let's jump back over to the configuration, and we'll quickly walk through it. So at the start here, I'm defining an object that I'll be using later on. So it's a component, and it's just what I'm using as my custom separator. So it's just got this bar character in here, and I'm setting it to the statusLineNonText that we just customized. I then go ahead and I disable the built-in separators that come with LuaLine, because I want more control over how those are rendered. This global status setting is really cool. We're not going to be able to see what it does at the moment. Actually, let's change this to false, and we'll resource this file, and let's open a visual split.
We're not going to be able to see what it does at the moment. Actually, let's change this to false, and we'll resource this file, and let's open a visual split. So if you look down the bottom of the screen, you'll notice that I've got... Actually, it goes a bit funny over there. But you'll notice that I've got two status lines, one for each split I'm in. If we close this and set this to true and resource this file, now if I do a visual split, you'll see I've just got one global status line for the whole application, which is the way I like it. Let's use :on, short for only, to get back to only one window. Now, for the theme section, it's important to know that LuaLine breaks itself down into six different sections.
Configuring BufferLine8:08
And that's left square bracket, I should say. But once again, of course, I want to customize this. So let's go ahead and delete the setup method. And we'll change this to UserPluginsBufferLine. Save this. And now we'll create that file in nvim.lua. UserPluginsBufferLine.lua. Go ahead and paste in my BufferLine config. And let's save this file. And we'll source this one.
And let's save this file. And we'll source this one. And that's still not looking quite right. So let's go ahead and quit out of vim. And we'll open it back up again. Oh, I must have forgotten to run php artisan config:cache. So it's still loading the old version of this. So let's run php artisan config:cache. Now let's close it and start it up again. And that's better.
Now let's close it and start it up again. And that's better. That's how I like it. So we'll come back into, actually let's come straight into the BufferLine config. And just so we can see what it looks like, let's also open Plugins.lua. So you'll see my active tab is showing up at the top there. And I can switch between them. And I think that looks pretty good. So in terms of customizations, there's a few things I'm disabling here. This indicator icon, I can't remember what this actually does.
Installing IndentBlankLine11:29
And I think this is why this plugin doesn't work so nice if it loads after your theme customizations, because that's where it's pulling the values from whatever you had prior to the theme loading. And for most of these, I'm setting them to the statusLine. Some of them I'm setting them to statusLineNonText. But yeah, overall, that's what it looks like to customize. And I wouldn't recommend getting this deep with it, to be honest, unless you really want to get into customizing it. And of course, you can always copy the settings I've created as well. So now let's jump back to our plugins.lua file and we'll install another plugin. And this one is called indentBlankLine.
to set it to be a lot more faint than what's showing here. So I'm setting this to a custom color. So let's go ahead and we'll run pack and compile to reload that. And that just makes those lines a lot less obvious. As for my config, there's not much to show here, but we'll jump back down to where we were using Ctrl-O to go out in the jump list. And let's go ahead and change this to UserPluginsIndentBlankLine.lua and we'll remove the .setup. Oops, sorry, I don't need that .lua on the end there.
and we'll remove the .setup. Oops, sorry, I don't need that .lua on the end there. So let's get rid of that. And we'll create that file in ~/.config/nvim/lua/user/plugins/indentBlankLine.lua These settings are pretty boring. I'm basically just telling indentLine when not to run. So I don't want it to happen in the help menus, in the built-in terminal, on the dashboard, a few other things that I'll be showing you later.
Installing and Customizing Dashboard14:32
This one is a dashboard. So let's go ahead and save this one. This one we don't need to call a setup method on it to load it because this one kind of integrates more deeply into NeoVim. So let's call packer sync. And then we'll close NeoVim and we'll open it up again. And now you see we get this dashboard welcome screen. Now this one isn't really that useful out of the box. So let's go ahead and jump back into here and we'll customize this one. So let's define a config function.
So let's go ahead and jump back into here and we'll customize this one. So let's define a config function. And inside here we will require User, plugins, dashboard, and vim. That should be good. We'll save that file and let's go ahead and create that one. The plugins directory, dashboard, and vim loa. So I'm going to paste some stuff in here. It's going to look a little bit funny. But we're importing the dashboard module and here's where we can customize some options to it.
