Skip to content

When formatting the code, the blocks that were collapsed are expanded. #3955

@NikitinVladimirV

Description

@NikitinVladimirV

IDE: VSCode,
Plugin: Prettier,
Settings:

  • prettierrc:
    {
    "printWidth": 80,
    "tabWidth": 2,
    "useTabs": false,
    "semi": true,
    "singleQuote": true,
    "trailingComma": "none",
    "bracketSpacing": true,
    "arrowParens": "avoid",
    "proseWrap": "never",
    "endOfLine": "lf",
    "objectCurlySpacing": false
    }
    -settings.json:
    {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true,
    "editor.formatOnPaste": true,
    "prettier.enable": true,
    "prettier.requireConfig": false,
    "prettier.printWidth": 300,
    }

Using:

  1. Сollapse everything(ctrl+k, ctrl+0)
  2. Make changes
  3. ctrl+s(save)

And the blocks that were collapsed are expanded. How to solve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions