Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Non-matching closing bracket in a block of code #8316

Closed
adamantinum opened this issue Sep 17, 2023 · 3 comments
Closed

Non-matching closing bracket in a block of code #8316

adamantinum opened this issue Sep 17, 2023 · 3 comments

Comments

@adamantinum
Copy link

I don't know if it's the expected behaviour, but if I'm writing a block of code delimited by parentesis I would expect, starting a new line and closing the bracket, to match the closing bracket created by auto-pairing.

E.g.:

{
    |     // here I start a new line and type '}'
}

I get

{
    
    }|
}
@pascalkuthe
Copy link
Member

This is working as intended. I don't really see the issue here. Do you mean that you want the bracket to be automaticlly dedented? That would be #6044

@adamantinum
Copy link
Author

adamantinum commented Oct 19, 2023

It should also use the previously autoinserted closing bracket, instead of adding an exceeding one

@pascalkuthe
Copy link
Member

Ah so you mean how you can type } at {|} to move the cursor to the right {}|.

Yeah I don't think we will implement this. That would mean we would skip arbitrary whitespace (including newlines).

{| } also inserts an extra bracket on typing }.

Changing this would leave to a lot of annoying false positives.

@helix-editor helix-editor locked and limited conversation to collaborators Oct 19, 2023
@pascalkuthe pascalkuthe converted this issue into discussion #8574 Oct 19, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants