trim.nvim icon indicating copy to clipboard operation
trim.nvim copied to clipboard

Don't Trim Current Line

Open bradharms opened this issue 6 months ago • 0 comments

When using this plugin in conjunction with auto-save and auto-close, automatic indentation generated by opening a bracket or other actions will get immediately deleted and send your cursor to the left. You then have to manually re-indent the line(s). To me it seems like the easiest way to avoid this problem for all cases would be to simply have an option to not trim the current line, at least while in edit mode.

EDIT: It seems like there may be some combination of plugins causing this issue collectively, as not all automatic indentation triggers it, nor does auto-closing brackets. It seems to occur when I open a bracket, which generates a closing bracket, then immediately press enter to go to the newline between the brackets. A new line appears with the correct indent briefly, but then auto-save triggers, which then triggers trim to delete the intent that was just created.

bradharms avatar Aug 12 '24 21:08 bradharms