Skip to content

fix(git): respect variable prefix indent when completing options#2506

Merged
echasnovski merged 1 commit into
nvim-mini:mainfrom
abeldekat:fix_git_completion
Jul 10, 2026
Merged

fix(git): respect variable prefix indent when completing options#2506
echasnovski merged 1 commit into
nvim-mini:mainfrom
abeldekat:fix_git_completion

Conversation

@abeldekat

@abeldekat abeldekat commented Jul 10, 2026

Copy link
Copy Markdown
Member

Git option completion fails when options are not indented by 7 spaces. Unfortunately, it seems that the number of spaces used varies per system.

This PR creates the regular expression dynamically, parsing the nr of spaces of the first valid option. That should be the first line after 'OPTIONS' starting with at least one space ending in '-'

@abeldekat

Copy link
Copy Markdown
Member Author

I pushed an update, removing the 'else'

Comment thread lua/mini/git.lua Outdated
@abeldekat
abeldekat force-pushed the fix_git_completion branch from 17a55a4 to c3f6660 Compare July 10, 2026 12:53

@echasnovski echasnovski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for looking into this!

@echasnovski echasnovski changed the title fix(git): make regex detecting options dynamic when completing fix(git): respect variable prefix indent when completing options Jul 10, 2026
@echasnovski
echasnovski merged commit f28b029 into nvim-mini:main Jul 10, 2026
18 of 24 checks passed
@abeldekat
abeldekat deleted the fix_git_completion branch July 10, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants