Skip to content

autoClosingPairs in language-configuration.json doesn't allow multiple entries that use quotes. #58619

Closed

Description

@TylerLeonhardt

I'm looking for a way to support autoClosingPair of:

' ' , " ", @' '@, and @" "@

However, when I add, for example:

["@'","'@"] to the language-configuration.json it doesn't work and still autocloses just ' so it looks like @''.

If I remove this entry from the autoClosingPairs, then @' closes properly to become @''@. But then ' no longer completes.

Is there a way to do what I'm trying to do?

Activity

  1. added
    editor-autoclosing
    feature-request
    on Sep 17, 2018
  2. rmunn commented on Aug 16, 2019

    @rmunn
    Contributor

    It looks like this is related to #72177, which is a slightly different issue but probably caused by the same underlying bug.

  3. vscodebot commented on Jan 15, 2020

    @vscodebot

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  4. TylerLeonhardt commented on Jan 16, 2020

    @TylerLeonhardt
    MemberAuthor

    Since this is an extensibility issue, I find it hard to believe that this will get the required likes to not be closed.

    Please consider not doing that...

    This can be viewed as a bug (or at least a silly limitation) as I can have auto closing pairs of ' and auto closing pairs of @' but not together.

  5. vscodebot commented on Mar 6, 2020

    @vscodebot

    This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding

  6. 2 remaining items

  7. vscodebot commented on Mar 6, 2020

    @vscodebot

    🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  8. alexdima commented on Apr 14, 2020

    @alexdima
    Member

    TylerLeonhardt This works fine for me on latest VS Code. If I add:

    { "open": "@'", "close": "'@", "notIn": ["string", "comment"]},
    

    to extensions/powershell/language-configuration.json, this is the behaviour I get:

    Kapture 2020-04-14 at 10 29 41

    I believe this got addressed as a side effect of 37981d8 . Can you please confirm?

  9. TylerLeonhardt commented on Apr 14, 2020

    @TylerLeonhardt
    MemberAuthor

    Awesome - let me give this a test.

    Why was this closed? The change will need to be in this repo so that the maximum amount of people are affected (aka those that don't install the PowerShell extension but edit a PowerShell script).

  10. alexdima commented on Apr 14, 2020

    @alexdima
    Member

    TylerLeonhardt I closed the issue because I considered the initial issue is resolved. So now "autoClosingPairs in language-configuration.json does allow multiple entries that use quotes".

    Was this issue meant to be about PowerShell specifically? I thought that was given just as an example. Do you want that we add @' and '@ as auto-closing pairs to the built-in PowerShell language configuration?

  11. TylerLeonhardt commented on Apr 14, 2020

    @TylerLeonhardt
    MemberAuthor

    Thanks Alexandru Dima (@alexdima), makes sense! Yes we should add those to the built-in PowerShell language configuration. I was about to send a PR your way 😄

  12. TylerLeonhardt commented on Apr 14, 2020

    @TylerLeonhardt
    MemberAuthor
  13. added
    verification-needed
    on Apr 28, 2020
  14. locked and limited conversation to collaborators on May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-autoclosingfeature-requestverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions