Overview
Lualine is a blazing fast and highly customizable statusline written in pure Lua. It provides information about the current buffer, git status, diagnostics, and more. Plugin: lualine.nvim Config File:lua/user/lualine.lua
Features
- Fast performance
- Automatic theme detection
- Git branch and diff indicators
- LSP diagnostics display
- Custom progress indicator
- Responsive design (hides components on narrow windows)
Statusline Layout
The statusline is divided into sections:Active Sections
| Section | Components | Description |
|---|---|---|
| lualine_a | branch, diagnostics | Git branch and error/warning counts |
| lualine_b | mode | Current mode (NORMAL, INSERT, etc.) |
| lualine_c | - | Empty (available for custom content) |
| lualine_x | diff, spaces, encoding, filetype | Git changes, indentation, file encoding and type |
| lualine_y | location | Cursor line and column |
| lualine_z | progress | Custom visual progress bar |
Component Configuration
Branch Component
Displays the current Git branch with an icon:Diagnostics Component
Shows LSP error and warning counts:Mode Component
Displays the current Vim mode with custom formatting:-- NORMAL --, -- INSERT --
Diff Component
Shows git changes (only visible on wider windows):Spaces Component
Displays the current indentation setting:spaces: 2 or spaces: 4
Filetype Component
Shows filetype without icons:Location Component
Displays cursor position:42:16 (line 42, column 16)
Progress Component
Custom visual progress bar showing position in file:Responsive Design
Components can hide on narrow windows:Theme
Lualine automatically detects and applies your colorscheme:Available Themes
Change to a specific theme:Separators
The configuration uses minimal separators:Powerline Separators
For a more traditional powerline look:Disabled Filetypes
Lualine is hidden in these special buffers:Inactive Sections
Simplified statusline for inactive windows:Customization Examples
Add LSP Server Name
Show Current Time
Enable Colored Diff
Add Info and Hint Diagnostics
Related Configuration
- Bufferline - Complementary buffer tabs
- LSP - Provides diagnostic information
- Gitsigns - Provides git diff data

