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

Typing a quote character after new inserts two quotes. #74162

Open
vsfeedback opened this issue Jun 26, 2024 · 2 comments
Open

Typing a quote character after new inserts two quotes. #74162

vsfeedback opened this issue Jun 26, 2024 · 2 comments
Labels
Area-IDE Bug IDE-Formatter Code formatter and/or smart indent Need More Info The issue needs more information to proceed.
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] [regression] [worked-in:17.8]
because i have to fight against it, all the time, i needed to disable the feature.
Three things need to happen to make it usable, again:

  1. configure the different types of braces / quotes that should be completed automatically.
  • especially, it's crazy that this also is the checkbox for automatic quote completion - those are two different things
  1. configure whether it should trigger only at line endings / before whitespace / in all places
  • i need to CONSTANTLY delete the artifacts it creates because i am in the middle of code, adding missing quotes or parentheses - this makes it impossible to NOT look at the screen while typing, too - you never know when it sprinkles in some random characters. yay
  1. adhere to the settings for {} placing when creating the closing brace for curlies.
  • if i have them configured to be in separate lines, please put the closing one at the proper place (and put the opening one with the caret there, too, if possible.

Original Comments

Feedback Bot on 3/11/2024, 07:22 PM:

(private comment, text removed)

Alisa Qu [MSFT] on 3/13/2024, 01:16 AM:

(private comment, text removed)

Alexander Gayko on 4/2/2024, 07:04 AM:

(private comment, text removed)

Feedback Bot on 3/19/2024, 10:28 PM:

(private comment, text removed)

Alisa Qu [MSFT] on 4/2/2024, 07:39 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 26, 2024
@CyrusNajmabadi CyrusNajmabadi changed the title automatic brace completion is working HORRIBLY Typing a quote character after new inserts two quotes. Jun 26, 2024
@CyrusNajmabadi
Copy link
Member

this is def an odd case. It's unclear to me why inserting open/quote at the same time here is bad. Presumably if a string is being written here, it's going to need its close brace. Would need the user to indicate why that's actually undesirable here.

@CyrusNajmabadi CyrusNajmabadi added the Need More Info The issue needs more information to proceed. label Jun 26, 2024
@dotnet-policy-service dotnet-policy-service bot removed the Need More Info The issue needs more information to proceed. label Jun 26, 2024
@CyrusNajmabadi
Copy link
Member

if i have them configured to be in separate lines, please put the closing one at the proper place (and put the opening one with the caret there, too, if possible.

Note: we don't have settings for braces to be on separate lines. What we have is a setting about where the opening and closing braces should go if it is a multi-line construct. We always allow (and attempt to preserve) braces on hte same line if that's what the user wants for a particular construct.

So our model here is to emit as {} as that allows for the latter common form. Then, if the user hits enter within that, we update the braces to be in the right location for either setting of the formatting option.

@CyrusNajmabadi CyrusNajmabadi added Bug IDE-Formatter Code formatter and/or smart indent and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 26, 2024
@CyrusNajmabadi CyrusNajmabadi added this to the Backlog milestone Jun 26, 2024
@CyrusNajmabadi CyrusNajmabadi added the Need More Info The issue needs more information to proceed. label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug IDE-Formatter Code formatter and/or smart indent Need More Info The issue needs more information to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants