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

Support VSCode 1.49 format modified lines feature #1562

Closed
AlCalzone opened this issue Sep 16, 2020 · 7 comments · Fixed by #2447
Closed

Support VSCode 1.49 format modified lines feature #1562

AlCalzone opened this issue Sep 16, 2020 · 7 comments · Fixed by #2447
Labels
enhancement help-wanted Not something we plan on doing, but we will take a pull request. locked Please open a new issue and fill out the template instead of commenting.

Comments

@AlCalzone
Copy link

VS Code doesn't support this natively. We would only add this if VS Code's edit providers add this type of API.

Originally posted by @ntotten in #630 (comment)

Since version 1.49, VSCode has the option to apply auto-formatting only to modified lines. Maybe its worth revisiting the referenced issue now.

@ntotten
Copy link
Member

ntotten commented Sep 16, 2020

I'll look into it. Prettier formatting of partial documents though tends to be not very good.

@villecoder
Copy link

Fairly certain microsoft/vscode#107151 is related to this.

@CoLdAs1cE
Copy link

CoLdAs1cE commented Jan 26, 2021

Any update on this? Would be awesome!
@ntotten

@its-jman
Copy link

its-jman commented Feb 6, 2021

@CoLdAs1cE This plugin supports formatting modified lines. Instead of running the Format Document command, you will need to run the Format Modified Lines command.

@CoLdAs1cE
Copy link

CoLdAs1cE commented Mar 19, 2021

@CoLdAs1cE This plugin supports formatting modified lines. Instead of running the Format Document command, you will need to run the Format Modified Lines command.

yeah that seems to work somewhat, but dont like jsx 😄, if u have a
return ( <div className=''> <div className=''></div> </div> ) (styling did not apply here, but they are on different lines)
it will format both the or all the divs inside ( not the div with className you added or removed)

@ntotten ntotten added the help-wanted Not something we plan on doing, but we will take a pull request. label Apr 5, 2021
@ntotten
Copy link
Member

ntotten commented Jul 26, 2021

Range formatting doesn't work very well in prettier. There are many issues open with the core library: https://github.com/prettier/prettier/issues?q=is%3Aissue+is%3Aopen+range+

@ntotten ntotten closed this as completed Jul 26, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Oct 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement help-wanted Not something we plan on doing, but we will take a pull request. locked Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants