It'd be really nice to have an option to just format the lines in the buffer which are indexed by git or aren't in stage yet.
I've thought about an additional property in the opt attribute of the format_on_save function, to just run the formatting on git hunks if enabled.
Certainly, this could be out of scope for this plugin.
But I'm not really sure how to implement this feature myself just using your API & Lua...
Provide background
When working on projects a style guide wasn't established to a certain point, I'd be nice to gradually format the source code without loosing track of the file blames by reformatting the whole project code at once.
Also, I'd like to avoid covering the blame/hunks of my team comrades with my auto-formatting, when they disobey the style guide due to laziness/ by accident or whatever reason there is.
Did you check existing requests?
Describe the feature
It'd be really nice to have an option to just format the lines in the buffer which are indexed by git or aren't in stage yet.
I've thought about an additional property in the
opt
attribute of theformat_on_save
function, to just run the formatting on git hunks if enabled.Certainly, this could be out of scope for this plugin. But I'm not really sure how to implement this feature myself just using your API & Lua...
Provide background
When working on projects a style guide wasn't established to a certain point, I'd be nice to gradually format the source code without loosing track of the file blames by reformatting the whole project code at once.
Also, I'd like to avoid covering the blame/hunks of my team comrades with my auto-formatting, when they disobey the style guide due to laziness/ by accident or whatever reason there is.
What is the significance of this feature?
nice to have
Additional details
No response