Skip to content

feat: show the file position lualine was missing - #185

Merged
jiminu merged 1 commit into
mainfrom
feat/lualine-progress
Sep 9, 2026
Merged

feat: show the file position lualine was missing#185
jiminu merged 1 commit into
mainfrom
feat/lualine-progress

Conversation

@jiminu

@jiminu jiminu commented Sep 9, 2026

Copy link
Copy Markdown
Owner

options.lua turns ruler off and hands the cursor position to lualine,
but only half of it was restored.

:h 'ruler' describes what the built-in display covered:

Show the line and column number of the cursor position, separated by a
comma. When there is room, the relative position of the displayed text
in the file is shown on the far right:
Top / Bot / All / 45%

lualine splits those two halves across separate components:

-- location.lua
return string.format('%3d:%-2d', line, col)

-- progress.lua
if cur == 1 then return 'Top'
elseif cur == total then return 'Bot'
else return string.format('%2d%%%%', math.floor(cur / total * 100)) end

lualine_x carried "location" only, so the relative position was lost
when ruler was disabled. This adds "progress" next to it.

The two do not overlap: location is the absolute position, progress
the position within the file — the information the line number alone says
least about in a long file. ruler stays off, so nothing is displayed
twice.

No test accompanies this. The existing appearance assertions in
editor_workflow.lua each guard a constraint — no dependency on
nvim-web-devicons, glyphs that work without a Nerd Font, no dependency on
a personally installed fd. A statusline component has no such
constraint behind it, so an assertion would only restate the
configuration and would break on any future reordering of the section.

bash tests/neovim_config_test.bash — 11 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PGC35LZyrDE74wuQeNQ3oT

@jiminu
jiminu force-pushed the feat/lualine-progress branch from dc1b8d4 to c5e28a9 Compare September 9, 2026 06:57
options.lua turns 'ruler' off and hands the cursor position to lualine,
but only half of it was restored. Vim's ruler showed the line and column
together with the relative position in the file (`:h 'ruler'`):

    Top     first line is visible
    Bot     last line is visible
    All     first and last line are visible
    45%     relative position in the file

lualine's "location" component renders `line:col`, and "progress"
renders the Top/Bot/45% half. Adding it restores what disabling 'ruler'
removed, which matters most in the long files where the line number
alone says the least.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PGC35LZyrDE74wuQeNQ3oT
@jiminu
jiminu force-pushed the feat/lualine-progress branch from c5e28a9 to 54944da Compare September 9, 2026 06:57
@jiminu
jiminu merged commit ded17f1 into main Sep 9, 2026
7 checks passed
@jiminu
jiminu deleted the feat/lualine-progress branch September 9, 2026 07:01
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.

1 participant