You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It formats nicely but removes indentation from first line of visual selection.
I suppose it would be more reasonable to just keep the current indentation
The text was updated successfully, but these errors were encountered:
Important notes:
Using the prettier api for --range-start and --range-end had some downsides:
sending larger buffer to prettier
requires the whole file to be valid even when formatting just portion of the file.
Details:
I kept the old behaviour as the default, but made it configurable via a flag, so users can make partial formatting enabled for them if they wish by simply:
letg:prettier#partial_format=1
I also created 2 helper commands :PrettierPartial and :PrettierFragment
:PrettierFragment - is the previous default behaviour where we only send selected portion to prettier (it has some benefits in that we only send less buffer and allow for formatting sections of files that are not entirely valid as a whole and have errors)
It formats nicely but removes indentation from first line of visual selection.
I suppose it would be more reasonable to just keep the current indentation
The text was updated successfully, but these errors were encountered: