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

Add Remove Brackets Command #160270

Merged
merged 11 commits into from
Mar 3, 2023
Merged

Add Remove Brackets Command #160270

merged 11 commits into from
Mar 3, 2023

Conversation

zardoy
Copy link
Contributor

@zardoy zardoy commented Sep 7, 2022

Description: deletes highlighted brackets pair in current editor.

fixes Pustelto/Bracketeer#49
fixes Pustelto/Bracketeer#10
fixes Pustelto/Bracketeer#55

Motivation

Bracketeer has hard limitation as extensions can't read language configurations in the web (in case of Bracketeer all some brackets are hardcoded e.g. vscode dynamic < and > bracket matching).

As a benefit of using native bracket model, there is small, but noticeable performance improvement.
I compared it on the contents of this file: https://github.com/microsoft/TypeScript/blob/main/lib/tsserverlibrary.d.ts

Bracketeer: latency 40ms-1s ~150ms for first time in position, then ~40ms
New command: always 2-11ms

@zardoy zardoy changed the title Feat: implement brackets removing Add Remove Brackets Command Sep 7, 2022
@mjbvz mjbvz assigned hediet and unassigned mjbvz Sep 7, 2022
@zardoy
Copy link
Contributor Author

zardoy commented Sep 9, 2022

//cc @hediet
Update: Oops, sorry didn't see the reassignment. By the way can it get included into next release? 😄

@hediet hediet added this to the October 2022 milestone Sep 27, 2022
@hediet
Copy link
Member

hediet commented Sep 27, 2022

Related: #134371

It would be cool if ctrl+delete would delete the bracket before the cursor and it's matching counterpart.

@hediet hediet modified the milestones: October 2022, November 2022 Oct 25, 2022
@aeschli aeschli modified the milestones: November 2022, December 2022 Nov 29, 2022
@hediet hediet modified the milestones: January 2023, On Deck Jan 26, 2023
@zardoy
Copy link
Contributor Author

zardoy commented Mar 1, 2023

@hediet is this ready to merge, or there is anything else to be done?

I also wonder shouldn't this command be renamed to Delete Brackets instead?

@hediet hediet enabled auto-merge March 2, 2023 11:06
@hediet hediet merged commit fa758a7 into microsoft:main Mar 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants