Configure Neovim - Adding StatusLine

Published on Feb 27, 2024

Configure Neovim - Adding StatusLine

Adding A StatusLine to Our Neovim Configuration - Lualine

Now our UI in Neovim is shaping up to be something nice, let’s add a statusline at the bottom of the editor window to show the different modes we are using in addition to other relevant information we will like to see. To do this let’s use the Nvim-Lualine plugin.

Adding the Plugin

On the page we can aslo see that there is a Themes link to the various themes that are available to use. I use the default ‘auto’ theme. The file structure now looks like this;

lua/
    config/
    plugins/
      colorscheme.lua
      noice.lua
      lualine.lua

To install we create a new file called lualine.lua and paste the following code into it. So visiting the plugin webpage on Github, we can use the following code below to install the plugin.

return
{
    'nvim-lualine/lualine.nvim',
    dependencies = { 'nvim-tree/nvim-web-devicons' },
    config = function ()
    	require("lualine").setup{
        options = {
        icons_enabled = true,
          theme = 'auto'
        }
      }
    end
}

With ‘auto’ set for the theme, the plugin tries to match your colorscheme with the theme that fits it. So with this done, save the file and quit Neovim and see your new look with lualine added to the UI. Lualine Plugin Start Screen Look Now we can move on to adding a fuzzy finder to find stuff at our finger tips. You can read my previous posts on Neovim Configuraton here.

Author Information

aeon501
aeon501

Web Developer, Restless. My mind goes on epic voyages, then return back to reality. I write about things I have experienced in my coding journey.

View all posts
Advertisement
Ad placeholder
Sponsored
Ad 2