prettier-atom icon indicating copy to clipboard operation
prettier-atom copied to clipboard

Folding doesnt presist across format

Open tomkulaga opened this issue 6 years ago • 1 comments

When I have folded items in my file, Then i format with Prettier through this extensions. It unfolds everything. It would be nice if it kept the folding after format.

Reproduce:

  1. hit CTRL+K, CTRL+2 to fold stuff in the file
  2. Hit CTRL +ALT +F to format
  3. the folds from step 1 are lost and the document is all un folded again
Atom version: 1.29.0-beta0
prettier-atom version: 0.54.0
prettier: bundled
prettier version: 1.13.4
prettier-eslint version: 8.8.2
prettier-atom configuration: {
  "useEslint": false,
  "useStylelint": false,
  "useEditorConfig": true,
  "formatOnSaveOptions": {
    "enabled": false,
    "respectEslintignore": true,
    "showInStatusBar": false,
    "excludedGlobs": [],
    "whitelistedGlobs": [],
    "isDisabledIfNotInPackageJson": false,
    "isDisabledIfNoConfigFile": false
  },
  "prettierOptions": {
    "singleQuote": false,
    "bracketSpacing": true,
    "semi": true,
    "useTabs": false,
    "jsxBracketSameLine": false,
    "printWidth": 80,
    "tabWidth": "auto",
    "trailingComma": "none",
    "parser": "babylon",
    "arrowParens": "avoid"
  },
  "prettierEslintOptions": {
    "prettierLast": false
  },
  "scopes": {
    "javascript": [
      "source.js",
      "source.jsx",
      "source.js.jsx",
      "source.babel",
      "source.js-semantic",
      "text.html.basic",
      "text.html.vue"
    ],
    "typescript": [
      "source.ts",
      "source.tsx",
      "source.ts.tsx"
    ],
    "css": [
      "source.css",
      "source.less",
      "source.css.less",
      "source.scss",
      "source.css.scss",
      "source.css.postcss"
    ],
    "json": [
      "source.json"
    ],
    "graphQl": [
      "source.graphql"
    ],
    "markdown": [
      "source.md",
      "source.gfm",
      "text.md"
    ],
    "vue": [
      "text.html.vue"
    ]
  }
}

tomkulaga avatar Jul 02 '18 23:07 tomkulaga

I too wish to see this resolved.

cntrlz avatar Sep 20 '19 16:09 cntrlz