Update: Indentation woes#3302
Open
codebykat wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
In #3216, I changed Monaco's
wrappingIndenttononein order to address a request to support hanging indents on paragraphs. Unfortunately this also removes the indentation from lists, making lists less readable.Some further research in #3053 (comment) but basically I think we were better off with the default of
same. There's no way to indent paragraphs, sadly, as even a single space gets matched by the word wrapping algorithm (which is not affected by the settings for detecting indentation settings, tab size, etc.).Monaco/VS Code does not support these things I've thought of as workarounds:
Here are some relevant upstream issues: microsoft/monaco-editor#3914, microsoft/vscode#219680, microsoft/vscode#169804, microsoft/vscode#164267
Anyhow, this PR represents a partial revert of #3216, as maybe the least terrible of the available options. I think that
indentis a deal-breaker due to representing a serious departure from expectations for long-form writing, whereas a hanging indent on paragraphs is more of a "nice to have" for that use-case. Meanwhile for lists,noneis pretty bad, probably(?) worse than the weird behavior of indenting entire paragraphs that we get withsame.Which is a complicated way of saying that
sameis optimal for lists with word-wrapping,noneis optimal for paragraphs, and we can't switch our strategy depending on which it is we have, so we have to pick a side.Other considerations:
Screenshots
Here are the three options and their trade-offs.
Release
Release notes updated with:
n.b. I've added this to a new minor version, 2.23.3, but it could arguably be a hotfix for 2.23.2.