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

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

Closed
TylerLeonhardt opened this issue Sep 13, 2018 · 12 comments
Assignees
Labels
editor-autoclosing Editor automatic closing of parens / brackets / etc. feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@TylerLeonhardt
Copy link
Member

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?

@jrieken jrieken assigned alexdima and aeschli and unassigned jrieken Sep 17, 2018
@aeschli aeschli removed their assignment Sep 17, 2018
@alexdima alexdima added editor-autoclosing Editor automatic closing of parens / brackets / etc. feature-request Request for new features or functionality labels Sep 17, 2018
@alexdima alexdima added this to the Backlog milestone Sep 17, 2018
@alexdima alexdima removed their assignment Aug 8, 2019
@rmunn
Copy link
Contributor

rmunn commented Aug 16, 2019

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

@alexdima alexdima modified the milestones: Backlog, Backlog Candidates Oct 24, 2019
@vscodebot
Copy link

vscodebot bot commented Jan 15, 2020

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!

@TylerLeonhardt
Copy link
Member Author

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.

@vscodebot
Copy link

vscodebot bot commented Mar 6, 2020

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

@TylerLeonhardt
Copy link
Member Author

Pls no

@rmunn
Copy link
Contributor

rmunn commented Mar 6, 2020

It's up to 25 votes now, so I think it's safe. But I agree with what you wrote in #91714 (comment) about how the autoclose process selects against extension-related issues since a lot fewer people experience them.

@vscodebot
Copy link

vscodebot bot commented Mar 6, 2020

🙂 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!

@alexdima
Copy link
Member

alexdima commented Apr 14, 2020

@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?

@alexdima alexdima self-assigned this Apr 14, 2020
@alexdima alexdima modified the milestones: Backlog, April 2020 Apr 14, 2020
@TylerLeonhardt
Copy link
Member Author

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).

@alexdima
Copy link
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?

@TylerLeonhardt
Copy link
Member Author

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

@TylerLeonhardt
Copy link
Member Author

@alexdima PR sent: #95245

@alexdima alexdima added the verification-needed Verification of issue is requested label Apr 28, 2020
@JacksonKearl JacksonKearl added the verified Verification succeeded label Apr 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-autoclosing Editor automatic closing of parens / brackets / etc. feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants