Add lualine as statusline, winbar, and bufferline replacement#1
Add lualine as statusline, winbar, and bufferline replacement#1
Conversation
Migrates the old lualine config to the new lazy.nvim setup and configures it to replace three separate components: - Statusline: mode, branch, filename, diagnostics, encoding, filetype - Tabline: buffer list with index numbers + tab indicator - Winbar: relative file path per window (replaces vim.opt.winbar) Also updates laststatus to 3 for globalstatus compatibility. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
Replaces lualine's buffers tabline component with grapple-line, showing only pinned files instead of all open buffers. Keymaps: - <leader>a to toggle pin, <leader>A to open tags window - <leader>1-9 to jump to pinned file by index - <A-S-i>/<A-S-u> to cycle through pinned files https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
Works with :tcd so each tab gets its own set of grapple tags, matching the scope.nvim tab-scoped buffer behavior. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
Tabs now show meaningful labels with priority: 1. Manual name (via :TabRename) 2. tcd directory name (if :tcd was used) 3. Active buffer filename (fallback) :TabRename with no args clears the name. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
There was a problem hiding this comment.
Pull request overview
This PR migrates the lualine configuration from the old packer-based Neovim setup to the new lazy.nvim-based setup. It configures lualine to handle three UI components: statusline (showing mode, branch, filename, diagnostics, encoding, and filetype), tabline (displaying grapple-tagged files and tabs with custom labels), and winbar (showing relative file paths per window). The configuration also introduces a custom tab labeling system with a :TabRename command and updates laststatus to 3 for global statusline compatibility.
Changes:
- Adds lualine plugin configuration with statusline, tabline, and winbar sections
- Implements custom tab labeling with TabRename command supporting manual names, tcd directories, and buffer filenames
- Adds grapple.nvim and grapple-line.nvim for file tagging and tabline integration
- Updates laststatus from 2 to 3 and removes manual winbar setting
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| nvim/.config/nvim-new/lua/plugins/lualine.lua | Complete lualine configuration with custom tab labeling function and TabRename command |
| nvim/.config/nvim-new/lua/plugins/grapple.lua | Grapple plugin for file tagging with keybindings and grapple-line integration |
| nvim/.config/nvim-new/lua/config/options.lua | Updates laststatus to 3 for globalstatus and removes manual winbar configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Winbar now shows: filename ● path/to/dir (muted Comment color) - Filename is prominent, modified (●) and readonly () indicators inline - Path shown in muted Comment highlight, hidden if file is at cwd root Statusline now shows "● N" in yellow when N buffers have unsaved changes. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
- Disable winbar on NvimTree, Lazy, mason, qf, help, terminal, grapple - Use DiagnosticWarn highlight for unsaved indicator (adapts to theme) https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
Terminal splits now show " Terminal N" in the winbar using the snacks terminal count. Re-enabled winbar for terminal buffers. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
Terminal winbar now shows like iTerm/Ghostty tabs: Terminal 1 npm run dev ~/Source/frontend Uses vim.b.term_title for the running process (dynamically updated by the shell) and parses cwd from the terminal buffer name. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
- Add type safety for snacks terminal count to prevent nil concatenation - Fix misleading comment on unsaved_buffers function - Remove inactive_sections (unused with globalstatus = true) https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
Remove redundant config that matches plugin defaults: - lualine: icons_enabled, theme, file_status, path, diagnostics sources, empty section tables - grapple: icons, quick_select - grapple-line: mode, show_names Simplify helper functions with ternary expressions. https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "tabs", | ||
| mode = 2, | ||
| fmt = function(_, context) | ||
| return tab_label(context.tabnr) |
There was a problem hiding this comment.
The tab_label function expects a tabpage ID (handle), but context.tabnr provides the tab number (1-indexed integer). To get the tabpage ID from the tab number, you need to use vim.api.nvim_list_tabpages()[context.tabnr].
| return tab_label(context.tabnr) | |
| local tabpages = vim.api.nvim_list_tabpages() | |
| local tabpage = tabpages[context.tabnr] | |
| if not tabpage then | |
| return "" | |
| end | |
| return tab_label(tabpage) |
Migrates the old lualine config to the new lazy.nvim setup and configures
it to replace three separate components:
Also updates laststatus to 3 for globalstatus compatibility.
https://claude.ai/code/session_01K8FLEn1MPdPi9yzQEu16CG