racket-langserver
racket-langserver copied to clipboard
Remove whitespace at end of line on format
Is it possible to remove trailing whitespace at the end of a line when formatting?
I'm happy to have a go at this if you can point me in the right direction :)
The code that does that is here --- https://github.com/jeapostrophe/racket-langserver/blob/master/text-document.rkt#L417-L447
However, we basically just lean on Racket's text% object, which is a monster with tons of options --- https://docs.racket-lang.org/gui/text_.html --- plus there are many sub-classes and mixins that we could enable. I honestly don't know where we would start on something like that.
Not sure if it is helpful for this, but there is a tool (not on the package server) for DrRacket to remove whitespace when saving files.
https://github.com/97jaz/drwhitespace
Is it possible to remove trailing whitespace at the end of a line when formatting?
I'm happy to have a go at this if you can point me in the right direction :)
I think this is completed at 6b6a3c27e33eca6df88cc3230d26b82b3db72e9f