Statusline (Lualine)
A fast and highly customizable statusline powered by lualine.nvim.Configuration
lua/plugins/statusline.lua
Sections
Left
Mode indicator and git branch
Center
Relative file path
Right
Filetype, search count, and cursor position
Section A: Mode
lua/plugins/statusline.lua
Section B: Git status
lua/plugins/statusline.lua
Git diff counts are pulled directly from Gitsigns for accurate, real-time statistics.
Section C: File path
lua/plugins/statusline.lua
Section X: File type
lua/plugins/statusline.lua
Section Y: Dynamic LSP/Search info
Intelligently switches between search count and LSP status:lua/plugins/statusline.lua
- Search mode
- LSP mode
When searching, shows:
3/15 (match 3 of 15)- Orange color for visibility
- Shows incomplete results with
?or>
Section Z: Position
lua/plugins/statusline.lua
- location: Line and column number
- spelunk: Additional navigation info (if available)
Tabline (Barbar)
Bufferline with tabs for easy buffer navigation:lua/plugins/tabline.lua
Buffer navigation
| Key | Action | Description |
|---|---|---|
<A-,> | Previous buffer | Move to previous buffer |
<A-.> | Next buffer | Move to next buffer |
<A-<> | Move left | Reorder buffer left |
<A->> | Move right | Reorder buffer right |
<A-c> | Close buffer | Close current buffer |
<A-p> | Pin buffer | Pin/unpin buffer |
Jump to buffer
lua/plugins/tabline.lua
<leader>1 through <leader>9.
Buffer picking
lua/plugins/tabline.lua
<C-p>: Magic buffer picking mode (shows letters for each buffer)<C-s-p>: Pick buffer to delete
Sorting buffers
| Key | Sort by | Description |
|---|---|---|
<Space>bb | Buffer number | Sort by buffer ID |
<Space>bn | Name | Sort alphabetically |
<Space>bd | Directory | Sort by directory |
<Space>bl | Language | Sort by filetype |
<Space>bw | Window number | Sort by window |
Configuration
lua/plugins/tabline.lua
Animations
Smooth transitions when switching buffers
Diagnostics
Shows error and warning counts in tabs
Pin support
Pin important buffers to prevent closing
Buffer indices
Shows numbers for quick jumping
Which-key
Displays popup with available keybindings:lua/plugins/ui.lua
Usage
- Type any key sequence and wait 1 second
- Which-key shows all available completions
- Example: Press
<leader>and wait to see all leader mappings
Buffer-local keymaps
Color highlighter
Highlights color codes inline:lua/plugins/ui.lua
Supported formats
Hex colors
#RGB, #RRGGBB, #RRGGBBAACSS functions
rgb(), rgba(), hsl(), hsla()Tailwind
Tailwind color classes in JSX/TSX
Comfy line numbers
Enhanced line numbers with automatic relative/absolute switching:lua/plugins/ui.lua
Line numbers automatically switch to absolute in insert mode and relative in normal mode.
Visual whitespace
Shows whitespace characters in visual mode:lua/plugins/ui.lua
Toggle
UFO folding
Improved code folding with LSP and Treesitter support:lua/plugins/ui.lua
LSP folding
Uses LSP for accurate fold ranges
Treesitter fallback
Falls back to Treesitter when LSP unavailable
Preview
Hover over folds to preview content
Performance
Efficient folding for large files
Default fold keybindings
| Key | Action | Description |
|---|---|---|
za | Toggle fold | Open/close fold under cursor |
zA | Toggle all | Toggle all nested folds |
zc | Close fold | Close fold under cursor |
zC | Close all | Close all nested folds |
zo | Open fold | Open fold under cursor |
zO | Open all | Open all nested folds |
zM | Close all folds | Close every fold in buffer |
zR | Open all folds | Open every fold in buffer |
zj | Next fold | Jump to next fold |
zk | Previous fold | Jump to previous fold |
Additional UI toggles
Provided by Snacks.nvim:| Key | Toggle | Description |
|---|---|---|
<leader>ul | Line numbers | Toggle line numbers |
<leader>uL | Relative numbers | Toggle relative line numbers |
<leader>uw | Wrap | Toggle line wrapping |
<leader>us | Spelling | Toggle spell check |
<leader>uc | Conceal | Toggle conceallevel |
Theme integration
All UI components use the gruvbox-material theme for consistency:- Lualine:
theme = "gruvbox-material" - Barbar: Inherits from colorscheme
- Which-key: Inherits from colorscheme
- UFO: Custom fold highlighting
Performance considerations
Lazy loading
Most UI plugins load on VeryLazy event
Efficient updates
Statusline updates only on relevant events
Conditional features
Some features disabled in specific contexts (terminal, large files)
Caching
Git status and LSP info cached to reduce recomputation