# lualine.nvim: A Fast Neovim Statusline Plugin with Low Startup Overhead

> lualine.nvim is a Neovim statusline plugin written in pure Lua that loads only the components you configure. Its startup overhead measured at 24.8ms in benchmark conditions compares to 79.9ms for vim-airline, and it supports themes, custom Lua components, and all major Neovim plugin managers.

**nvim-lualine/lualine.nvim** — A blazing fast and easy to configure neovim statusline plugin written in pure lua.

- Repository: https://github.com/nvim-lualine/lualine.nvim
- Stars: 8,140 · Forks: 553
- Language: Lua
- License: MIT
- Published: 2026-09-22 · Updated: 2026-09-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/nvim-lualine-lualine-nvim

## What lualine.nvim Is and Who It Is For

lualine.nvim is a statusline plugin for Neovim written entirely in Lua. It displays information at the bottom of each Neovim window: current mode, Git branch, file diagnostics, file name, encoding, and cursor position. The information displayed is fully configurable through a structured setup function.

The intended audience is Neovim users who want a statusline that shows contextually useful information without contributing significantly to editor startup time. The plugin requires Neovim 0.7 or higher. For older Neovim versions, the README points to compatibility tags such as compat-nvim-0.5. The repository is hosted at github.com/nvim-lualine/lualine.nvim and the primary README is the authoritative source for configuration options.

The design philosophy is selective loading: the plugin loads only the components you specify in your configuration, nothing else. This is how it keeps startup time low while still offering a broad component library. The README states this directly in the performance section.

## Startup Performance Against airline and lightline

The README includes a benchmark table comparing startup times across statusline plugins. Measurements were taken with a clean init.vim containing only vim-startuptime, vim-plug, and the plugin under test, with times as the average of 20 runs.

The results: control (no statusline plugin) 17.2ms, lualine 24.8ms, lightline 25.5ms, airline 79.9ms.

The 7ms difference between lualine and lightline is small. The difference between lualine and airline is roughly 55ms, which is the more significant comparison. vim-airline is a VimScript-based statusline plugin with a wide feature set and many integrations. Its higher startup time reflects both its loading strategy and VimScript's slower startup performance compared to Lua.

The selective loading design is what keeps lualine close to the control baseline. If you configure only two components (mode and filename), only those two components are loaded at startup. A configuration with many active components will increase memory usage and potentially increase the refresh time per event. The refresh_time setting (defaulting to 16ms, or about 60fps) controls how quickly the statusline redraws after a trigger event, and can be raised for configurations where frequent updates are unnecessary.

The README notes the benchmark was last updated on 18-04-2022. Startup times on current Neovim versions may differ. The methodology (a clean init.vim with only the test plugin) represents the best case; a real config with many plugins will show a smaller relative difference.

## Installing lualine.nvim

lualine.nvim supports the major Neovim plugin managers. The README documents four installation methods.

With lazy.nvim, which is the most commonly used modern plugin manager:

```lua
{
    'nvim-lualine/lualine.nvim',
    dependencies = { 'nvim-tree/nvim-web-devicons' }
}
```

With vim-plug:

```vim
Plug 'nvim-lualine/lualine.nvim'
" If you want to have icons in your statusline choose one of these
Plug 'nvim-tree/nvim-web-devicons'
```

With packer.nvim:

```lua
use {
  'nvim-lualine/lualine.nvim',
  requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
```

For Neovim 0.12 and later, the built-in vim.pack package manager is also supported:

```lua
vim.pack.add({
    'https://github.com/nvim-tree/nvim-web-devicons',
    'https://github.com/nvim-lualine/lualine.nvim'
})
```

nvim-web-devicons is optional but recommended for icons. A patched (Nerd Font) font is also needed for icons to render correctly.

## Section Layout and Available Built-in Components

The statusline in lualine.nvim is divided into six sections: A, B, and C on the left side, and X, Y, and Z on the right side. Each section holds an ordered list of components. The active section separator divides the left and right halves.

Activating the plugin with default settings:

```lua
require('lualine').setup()
```

The built-in components cover most common statusline needs: branch (Git branch), buffers, diagnostics (error and warning counts from your diagnostic source), diff (Git diff status), encoding, fileformat, filename, filesize, filetype, hostname, location (line:column), mode (Vim mode), progress (percentage through file), searchcount (matches when hlsearch is active), selectioncount (selected characters or lines), tabs, windows, and lsp_status (active LSPs with a progress spinner).

To configure a specific section, you pass a sections table:

```lua
sections = {lualine_a = {'mode'}}
```

This replaces the section's default component list with just the mode component.

## Custom Components: Lua Functions, Vim Variables, and Statusline Items

The real flexibility of lualine.nvim is the custom component system. Any Lua function, Vim function, Vim statusline item, or Vim variable can be used as a component.

A Lua function as a component:

```lua
local function hello()
  return [[hello world]]
end
sections = { lualine_a = { hello } }
```

A Vim variable from any scope:

```lua
sections = { lualine_a = { 'g:coc_status', 'bo:filetype' } }
```

Variables from g:, v:, t:, w:, b:, o:, to:, wo:, and bo: scopes are all supported. This means any plugin that exposes its state through a global variable can be shown in the statusline without a dedicated lualine component. A plugin like coc.nvim, which exposes its LSP status through g:coc_status, can be added directly with the string 'g:coc_status' as a component name.

Vim's native statusline items work directly:

```lua
sections = { lualine_c = {'%=', '%t%m', '%3p'} }
```

Vim functions are also valid as components:

```lua
sections = { lualine_a = {'FugitiveHead'} }
```

This compatibility with the existing Vim ecosystem means that switching to lualine.nvim does not require rewriting custom statusline logic from scratch. Any function that returns a string and any global variable that holds a string are directly usable, which keeps migration from a hand-written statusline straightforward.

The examples directory in the repository contains several complete configurations including evil_lualine.lua, bubbles.lua, slanted-gaps.lua, and cosmicink.lua. These demonstrate non-standard layouts that step outside the default six-section model.

## Themes and Separator Configuration

lualine.nvim ships with a large collection of themes. Setting a theme takes one line:

```lua
options = { theme = 'gruvbox' }
```

The full theme list is in THEMES.md in the repository. Themes can also be customized by loading the theme table and modifying specific color keys:

```lua
local custom_gruvbox = require'lualine.themes.gruvbox'
custom_gruvbox.normal.c.bg = '#112233'
require('lualine').setup {
  options = { theme  = custom_gruvbox },
}
```

This gives precise control over individual section colors without writing a complete theme from scratch.

Separators between sections and between components are configured through the section_separators and component_separators options. Both accept a table with left and right keys that take Nerd Font glyph characters. Separators can be disabled entirely by setting both to empty strings:

```lua
options = { section_separators = '', component_separators = '' }
```

The README notes that the separator glyphs may not display in a browser, as they require a Nerd Font.

## Limitations: Neovim Version Requirement and Maintenance

lualine.nvim requires Neovim 0.7 or higher. It does not work with vanilla Vim. If you use both Vim and Neovim with a shared configuration, lualine.nvim requires conditional loading to avoid errors in the Vim environment.

The winbar option is supported: the default configuration table shows disabled_filetypes entries for both statusline and winbar, indicating that winbar is part of the plugin's surface. This is useful for multi-window workflows where you want context information in the upper bar of each split rather than only in the global statusline.

The globalstatus option in the default configuration is set to false. Setting it to true shows a single statusline shared across all windows rather than one per window. This changes the visual behavior significantly and is useful when all splits should show the same file context.

Refresh timing is configurable: the default configuration table shows a refresh section with statusline, tabline, and winbar all set to 1000ms, and a refresh_time of 16ms (approximately 60fps). The events that trigger a refresh include WinEnter, BufEnter, and BufWritePost. For configurations where frequent statusline updates cause visual noise, raising the refresh interval reduces the update rate.

The repository has no GitHub releases. The last push was on 2026-05-31, approximately four months before the date of this writing. The project is MIT-licensed and is not archived. Custom theme submissions are welcomed through the contribution process documented in CONTRIBUTING.md.

## Conclusion

lualine.nvim is the clear choice for Neovim users who want a configurable statusline with low startup overhead and Lua-native component support. It is not a drop-in replacement for vanilla Vim statusline configuration and requires Neovim 0.7 or higher. The last push to the repository was on 2026-05-31.

## FAQ

### What is lualine.nvim?

lualine.nvim is a Neovim statusline plugin written in pure Lua that displays information including mode, Git branch, diagnostics, and cursor position. It loads only the components you configure, keeping startup overhead low. It requires Neovim 0.7 or higher.

### What are some alternatives to lualine.nvim?

The README's benchmark compares lualine.nvim to lightline (a VimScript statusline plugin with a similar selective-loading approach) and vim-airline (a feature-rich VimScript statusline with higher startup overhead). Both are established alternatives. lightline is closer in startup time to lualine.nvim; airline is heavier.

### Does lualine.nvim support winbar in addition to the standard statusline?

Yes. The default configuration table in the README includes disabled_filetypes entries for both statusline and winbar, and the options table includes a winbar refresh setting. Winbar is an upper bar that can display per-window context information in addition to the global statusline.

## Sources

- [Issues](https://github.com/nvim-lualine/lualine.nvim/issues)
- [License: MIT](https://github.com/nvim-lualine/lualine.nvim/blob/master/LICENSE)
- [nvim-lualine/lualine.nvim on GitHub](https://github.com/nvim-lualine/lualine.nvim)
- [README](https://github.com/nvim-lualine/lualine.nvim/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/nvim-lualine-lualine-nvim
