Skip to content

Add lualine as statusline, winbar, and bufferline replacement#1

Open
uloco wants to merge 14 commits intomainfrom
claude/migrate-nvim-config-ZP2rM
Open

Add lualine as statusline, winbar, and bufferline replacement#1
uloco wants to merge 14 commits intomainfrom
claude/migrate-nvim-config-ZP2rM

Conversation

@uloco
Copy link
Owner

@uloco uloco commented Feb 6, 2026

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

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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

uloco and others added 10 commits February 6, 2026 04:04
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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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].

Suggested change
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)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants