Skip to content

Option to disable differences in word wrap indentation for text languages and source languages #2356

@alexander-novo

Description

@alexander-novo

According to this Stack Overflow question, the decision to add an extra indentation after word wrapping with indent_subsequent_lines set to true is based solely on whether the language has been set to a "text"/markup or "source"/code language. This makes sense for straight plaintext, but many markup languages heavily rely on indentation to make them legible.

Consider this LaTeX file for a second:
image
This align environment contains 6 aligned lines of mathematical formulas (aligned at the &), but lines 106 and 107 wrap due to their length. The resulting 'extra' lines look like they are additional lines that are misaligned, as they do not begin with &.

The Stack Overflow question suggests the best solution to the problem being to change the syntax file of the language to a code-based language, but also mentions that this breaks other things such as hotkeys and other formatting. It would be nice if there were a syntax specific setting that would allow an override to force an extra indent for markup languages or no indent for code languages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions