Skip to content

[Feature request] Make multi-line string literals foldable #5139

Closed

Description

@andrewkolos

Consider a multi-line string in a .dart file:

final bigString = '''
I am a multiline string.
I might be really long.
For example, I could be an entire Android manifest (the XML you would find in an AndroidManifest.xml file)
that's defined in a test file.
'''

It would be nice if I could fold this. This is something I can do with multi-line string literals in JS/TS:

image

image

Describe alternatives you've considered
The user can manually create folding regions using the "Create Folding Range from Selection", but it's generally not worth the time to do this.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Jun 10, 2024
  2. added
    in editorRelates to code editing or language features
    on Jun 17, 2024
  3. added this to the v3.92.0 milestone on Jun 17, 2024
  4. DanTup commented on Jun 24, 2024

    @DanTup
    Member

    Fixed by dart-lang/sdk@4f36252. The fix is in the Dart analysis server so will show up in a future SDK release (not Dart-Code release).

  5. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Jun 24, 2024
  6. andrewkolos commented on Jun 26, 2024

    @andrewkolos
    Author

    Thank you for your continued work on folding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions