Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE raw string literal feature list #58356

Open
5 tasks
allisonchou opened this issue Dec 15, 2021 · 1 comment
Open
5 tasks

IDE raw string literal feature list #58356

allisonchou opened this issue Dec 15, 2021 · 1 comment
Labels
Area-IDE Concept-Continuous Improvement Retriage User Story A single user-facing feature. Can be grouped under an epic.
Milestone

Comments

@allisonchou
Copy link
Contributor

allisonchou commented Dec 15, 2021

Spec: https://github.com/dotnet/csharplang/blob/main/proposals/raw-string-literal.md
Championed issue: dotnet/csharplang#4304

IDE Feature List

  • Balance quotes (both in single-line and multi-line cases)

    Example:

    1. User has the following code:
    var s = """
    hello world
    """;
    
    1. User adds starting ":
    var s = """"
    hello world
    """;
    
    1. Roslyn should auto-add an ending ":
    var s = """"
    hello world
    """";
    
  • Balance curly braces in interpolated strings (both in single-line and multi-line cases)

    Example:

    1. User has the following code:
    var s = $$"""
                 {
                     hello world
                 };
                 """
    
    1. User adds {:
    var s = $$"""
                 {{
                     hello world
                 };
                 """
    
    1. Roslyn should auto-add an ending }:
    var s = $$"""
                 {{
                     hello world
                 }};
                 """
    
  • Indentation indication line

    Example:

    1. User has the following code:
    var xml = """
              <element attr="content">
                <body>
                </body>
              </element>
              """;
    
    1. Roslyn should add an option to show a visual line to show where the indentation of the raw string literal begins:
    var xml = """
              |<element attr="content">
              |  <body>
              |  </body>
              |</element>
              """;
    
  • Automatically add spaces to content if user adds spaces to last line

    Example:

    1. User has the following code:
    var xml = """
              <element attr="content">
                <body>
                </body>
              </element>
              """;
    
    1. User adds spaces to last line:
    var xml = """
              <element attr="content">
                <body>
                </body>
              </element>
                  """;
    
    1. Roslyn should auto-adjust contents to the right so the user avoids ending up in an error state:
    var xml = """
                  <element attr="content">
                    <body>
                    </body>
                  </element>
                  """;
    
  • Refactoring for converting a verbatim string with escapes to a raw string literal:

    Example:

    1. User has the following code:
    var s = @"hello "" world ";
    
    1. Roslyn should offer a refactoring to convert it to the following:
    var s = """hello " world""";
    
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Dec 15, 2021
@jinujoseph jinujoseph added Concept-Continuous Improvement and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jan 5, 2022
@jinujoseph jinujoseph added this to the 17.2 milestone Jan 5, 2022
@mikadumont mikadumont added the User Story A single user-facing feature. Can be grouped under an epic. label Jan 12, 2022
@allisonchou allisonchou modified the milestones: 17.2, 17.3 Mar 16, 2022
@Youssef1313
Copy link
Member

A possible IDE issue: #60599 (comment)

@allisonchou allisonchou removed their assignment Sep 7, 2022
@allisonchou allisonchou modified the milestones: 17.3, 17.4 Sep 7, 2022
@arunchndr arunchndr modified the milestones: 17.4, 17.6 P3 Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement Retriage User Story A single user-facing feature. Can be grouped under an epic.
Projects
None yet
Development

No branches or pull requests

5 participants