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

LSP OnTypeFormatting request doesn't work properly for \n #47691

Closed
ajaybhargavb opened this issue Sep 14, 2020 · 4 comments
Closed

LSP OnTypeFormatting request doesn't work properly for \n #47691

ajaybhargavb opened this issue Sep 14, 2020 · 4 comments
Assignees
Labels
Area-IDE Concept-Continuous Improvement LSP issues related to the roslyn language server protocol implementation
Milestone

Comments

@ajaybhargavb
Copy link

ajaybhargavb commented Sep 14, 2020

Version Used: 16.8.0 Preview 4.0 [30510.80.main]

Steps to Reproduce:

Example, (pipe is request location)

if (true) {
|}
  1. Send an LSP onTypeFormatting request to the C# language server for the above scenario. (Trigger character \n)

Expected Behavior:
Returns edits to make the code look like below,

if (true)
{
    |
}

Actual Behavior:
No edits returned

Note: onTypeFormatting works fine for ; and } trigger characters

Tracking issue on Razor: https://github.com/dotnet/aspnetcore/issues/23753

@ajaybhargavb
Copy link
Author

cc @jinujoseph @dibarbet

@jinujoseph jinujoseph added Area-IDE LSP issues related to the roslyn language server protocol implementation Concept-Continuous Improvement labels Sep 15, 2020
@jinujoseph jinujoseph added this to the 16.9 milestone Sep 15, 2020
@NTaylorMullen
Copy link
Contributor

Other newline scenarios include hitting "enter" inside of a comment as mentioned by: https://github.com/dotnet/aspnetcore/issues/26752

@ajaybhargavb
Copy link
Author

@dibarbet, can this now be closed given that you merged #48468?

@dibarbet
Copy link
Member

dibarbet commented Feb 1, 2021

yep closed in #48468

@dibarbet dibarbet closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement LSP issues related to the roslyn language server protocol implementation
Projects
None yet
Development

No branches or pull requests

4 participants