set trim_trailing_whitespace to false for inline snapshots#24339
set trim_trailing_whitespace to false for inline snapshots#24339Glyphack wants to merge 1 commit intoastral-sh:mainfrom
trim_trailing_whitespace to false for inline snapshots#24339Conversation
trim_trailing_whitespace to false for inline snapshots
|
I think most trailing whitespace comes from the diagnostic rendering. I wonder if we should fix that instead. Let me put codex on this and see if it can come up with a fix. Otherwise, I think this is the right solution because it's super annoying otherwise. |
|
#24343 fixes most trailing whitespaces in The other trailing whitespaces come from somewhere within our markdown rendering. I think we should take a look at whether those trailing whitespaces are necessary or can be replaced with another character. |
|
I merged a few PRs that:
It should now (once all PRs are merged) no longer be necessary to disable trailing whitespace trimming for those files. |
Summary
Some files have trailing whitespaces in the source code. I thought this was accidental but then realized it's on purpose because markdown is sensitive to whitespace.
Another solution I found to stop neovim from formatting these files on save is to set
trim_trailing_whitespaceto false for them. Without this change whenever you save that file any editor that supports EditorConfig it's gonna remove whitespaces and tests would fail.Test Plan