rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

Indenter Trim/Remove Trailing Spaces #6180

Open 5TjpWBU2wkwHpFDb opened 12 months ago

5TjpWBU2wkwHpFDb commented 12 months ago

Excess whitespace at the end of a line, esp. a "blank" line, is a hindrance when I use cursor keys. Please, make the indenter Indenter Trim/Remove Trailing Spaces

Additionally, maybe reduce multiple "blank" lines to one? Additionally, maybe remove the "blank" lines at the end of a module?

Vogel612 commented 10 months ago

We really need to handle #4251 before tackling any indenter enhancements, so I'm applying [status-deferred]

retailcoder commented 9 months ago

Side note, the indenter in RD3 is going to become "code formatting", to adhere with LSP terminology; trimming extraneous whitespace is very much in scope there. It's also inherently going to be based on hierarchical symbols and semantic tokens, which is a couple of notches beyond what the 2.x model is making available in the internal API.

The v3 model is being implemented right now, so code formatting will be a possible RD3 work item once the language server is able to issue workspace symbols and semantic tokens. Note to self: no need to wait until symbol types are resolved to invoke the code formatting pipeline.