Repository: prettier/prettier-atom (js)

Issue:
can not format vue style block
<!--
Before you post an issue, please ensure that your issue is not with the
[prettier](https://github.com/prettier/prettier) or
[prettier-eslint](https://github.com/prettier/prettier-eslint) packages. This is just the
atom plugin that calls these packages under the hood.

Describe your issue here with as many details as possible
-->

a Vue file looks like this
```vue
// app.vue

<template>
  <html-code></html-code>
</template>

<script>
// js code
</script>

<style lang='less'>
// less code
</style>
```

And the less code's scope is `source.css.less.embedded.html`, so I add this scope to `cssScope` setting. But it does not work for style block, and the script block works.

Since this is scope related, I believe this is atom and prettier-atom related.

<details>
Atom version: 1.23.1
prettier-atom version: 0.43.1
prettier version: 1.9.2
prettier-eslint version: 8.3.1
prettier-atom configuration: {
  "formatOnSaveOptions": {
    "cssScopes": [
      "source.css",
      "source.less",
      "source.css.less",
      "source.css.less.embedded",
      "source.css.less.embedded.html",
      "source.scss",
      "source.css.scss",
      "source.css.postcss"
    ],
    "isDisabledIfNoConfigFile": true,
    "showInStatusBar": true,
    "enabled": false,
    "respectEslintignore": true,
    "javascriptScopes": [
      "source.js",
      "source.jsx",
      "source.js.jsx",
      "source.babel",
      "source.js-semantic",
      "text.html.basic",
      "text.html.vue"
    ],
    "typescriptScopes": [
      "source.ts",
      "source.tsx",
      "source.ts.tsx"
    ],
    "jsonScopes": [
      "source.json"
    ],
    "graphQlScopes": [
      "source.graphql"
    ],
    "markdownScopes": [
      "source.md",
      "source.gfm",
      "text.md"
    ],
    "excludedGlobs": [],
    "whitelistedGlobs": [],
    "isDisabledIfNotInPackageJson": false
  },
  "prettierEslintOptions": {
    "prettierLast": true
  },
  "prettierOptions": {
    "semi": false,
    "singleQuote": true,
    "trailingComma": "es5",
    "bracketSpacing": true,
    "useTabs": false,
    "jsxBracketSameLine": false,
    "printWidth": 80,
    "tabWidth": "auto",
    "parser": "babylon"
  },
  "useFlowParser": false,
  "useEslint": false,
  "useStylelint": false,
  "useEditorConfig": true
}
</details>

Pull request:
Vue SFC support
Closes #327.

Removed Vue from embedded script targets and added dedicated scope in settings.

Patch:
diff --git a/dist/atomInterface/index.js b/dist/atomInterface/index.js
index f477a39..59e102b 100644
--- a/dist/atomInterface/index.js
+++ b/dist/atomInterface/index.js
@@ -75,8 +75,12 @@ var getMarkdownScopes = function getMarkdownScopes() {
   return getConfigOption('formatOnSaveOptions.markdownScopes');
 };
 
+var getVueScopes = function getVueScopes() {
+  return getConfigOption('formatOnSaveOptions.vueScopes');
+};
+
 var getAllScopes = function getAllScopes() {
-  return [getJavascriptScopes(), getTypescriptScopes(), getCssScopes(), getJsonScopes(), getGraphQlScopes(), getMarkdownScopes()].reduce(function (acc, els) {
+  return [getJavascriptScopes(), getTypescriptScopes(), getCssScopes(), getJsonScopes(), getGraphQlScopes(), getMarkdownScopes(), getVueScopes()].reduce(function (acc, els) {
     return acc.concat(els);
   });
 };
@@ -163,6 +167,7 @@ module.exports = {
   getJsonScopes: getJsonScopes,
   getGraphQlScopes: getGraphQlScopes,
   getMarkdownScopes: getMarkdownScopes,
+  getVueScopes: getVueScopes,
   getAllScopes: getAllScopes,
   getWhitelistedGlobs: getWhitelistedGlobs,
   isDisabledIfNotInPackageJson: isDisabledIfNotInPackageJson,
diff --git a/dist/config-schema.json b/dist/config-schema.json
index c28ed3a..93139a4 100644
--- a/dist/config-schema.json
+++ b/dist/config-schema.json
@@ -1,24 +1,21 @@
 {
   "useEslint": {
     "title": "ESLint Integration",
-    "description":
-      "Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your Prettier settings based on your ESLint config. If we cannot infer a Prettier setting from your ESLint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.<br><br>**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
+    "description": "Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your Prettier settings based on your ESLint config. If we cannot infer a Prettier setting from your ESLint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.<br><br>**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
     "type": "boolean",
     "default": false,
     "order": 1
   },
   "useStylelint": {
     "title": "Stylelint Integration",
-    "description":
-      "Use [prettier-stylelint](https://github.com/hugomrdias/prettier-stylelint) to infer your Prettier settings based on your Stylelint config. If we cannot infer a Prettier setting from your Stylelint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.",
+    "description": "Use [prettier-stylelint](https://github.com/hugomrdias/prettier-stylelint) to infer your Prettier settings based on your Stylelint config. If we cannot infer a Prettier setting from your Stylelint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.",
     "type": "boolean",
     "default": false,
     "order": 2
   },
   "useEditorConfig": {
     "title": "EditorConfig Integration",
-    "description":
-      "Use [EditorConfig](http://editorconfig.org/) configuration to load project-based settings for Prettier formatting.<br>Takes precedence over your settings. The following settings will be overriden if they are found in your `.editorconfig`: **Use tabs**, **Tab width**, **Print width**.",
+    "description": "Use [EditorConfig](http://editorconfig.org/) configuration to load project-based settings for Prettier formatting.<br>Takes precedence over your settings. The following settings will be overriden if they are found in your `.editorconfig`: **Use tabs**, **Tab width**, **Print width**.",
     "type": "boolean",
     "default": true,
     "order": 3
@@ -51,8 +48,7 @@
       },
       "javascriptScopes": {
         "title": "JavaScript Scopes",
-        "description":
-          "Select which files containing JavaScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing JavaScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
         "default": [
           "source.js",
@@ -70,10 +66,13 @@
       },
       "typescriptScopes": {
         "title": "TypeScript Scopes",
-        "description":
-          "Select which files containing TypeScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing TypeScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.ts", "source.tsx", "source.ts.tsx"],
+        "default": [
+          "source.ts",
+          "source.tsx",
+          "source.ts.tsx"
+        ],
         "items": {
           "type": "string"
         },
@@ -81,8 +80,7 @@
       },
       "cssScopes": {
         "title": "CSS Scopes",
-        "description":
-          "Select which files containing CSS should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing CSS should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
         "default": [
           "source.css",
@@ -99,10 +97,11 @@
       },
       "jsonScopes": {
         "title": "JSON Scopes",
-        "description":
-          "Select which files containing JSON should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing JSON should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.json"],
+        "default": [
+          "source.json"
+        ],
         "items": {
           "type": "string"
         },
@@ -110,10 +109,11 @@
       },
       "graphQlScopes": {
         "title": "GraphQL Scopes",
-        "description":
-          "Select which files containing GraphQL should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing GraphQL should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.graphql"],
+        "default": [
+          "source.graphql"
+        ],
         "items": {
           "type": "string"
         },
@@ -121,46 +121,57 @@
       },
       "markdownScopes": {
         "title": "Markdown Scopes",
-        "description":
-          "Select which files containing Markdown should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing Markdown should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.md", "source.gfm", "text.md"],
+        "default": [
+          "source.md",
+          "source.gfm",
+          "text.md"
+        ],
         "items": {
           "type": "string"
         },
         "order": 9
       },
+      "vueScopes": {
+        "title": "Vue Scopes",
+        "description": "Select which files qualify as Vue Single File Components and should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "type": "array",
+        "default": [
+          "text.html.vue"
+        ],
+        "items": {
+          "type": "string"
+        },
+        "order": 10
+      },
       "excludedGlobs": {
         "title": "Exclude (list of globs)",
-        "description":
-          "A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to separate each glob.",
+        "description": "A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to separate each glob.",
         "type": "array",
         "default": [],
-        "order": 10
+        "order": 11
       },
       "whitelistedGlobs": {
         "title": "Include (list of globs)",
-        "description":
-          "A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to separate each glob.<br><br>**Note:** If there are globs in this list, files not matching the globs will not be formatted on save, regardless of other options.",
+        "description": "A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to separate each glob.<br><br>**Note:** If there are globs in this list, files not matching the globs will not be formatted on save, regardless of other options.",
         "type": "array",
         "default": [],
-        "order": 11
+        "order": 12
       },
       "isDisabledIfNotInPackageJson": {
         "title": "Only format if Prettier is found in your project's dependencies",
-        "description":
-          "Only format on save when `prettier` (or `prettier-eslint`/`prettier-eslint-cli` if using *ESLint integration*) is in your project's `package.json` (dependencies or devDependencies)",
+        "description": "Only format on save when `prettier` (or `prettier-eslint`/`prettier-eslint-cli` if using *ESLint integration*) is in your project's `package.json` (dependencies or devDependencies)",
         "type": "boolean",
         "default": false,
-        "order": 12
+        "order": 13
       },
       "isDisabledIfNoConfigFile": {
         "title": "Only format if a Prettier config is found",
-        "description":
-          "Only format on save if we find a `.prettierrc` file (written in YAML or JSON), a `prettier.config.js` file that exports an object, or a 'prettier' key in your `package.json` file. <br><br>**Note:** You must have at least one valid rule in order for your config to be considered present.",
+        "description": "Only format on save if we find a `.prettierrc` file (written in YAML or JSON), a `prettier.config.js` file that exports an object, or a 'prettier' key in your `package.json` file. <br><br>**Note:** You must have at least one valid rule in order for your config to be considered present.",
         "type": "boolean",
         "default": false,
-        "order": 13
+        "order": 14
       }
     }
   },
@@ -213,7 +224,10 @@
       "tabWidth": {
         "title": "Tab Width",
         "description": "Number of spaces to use per tab. Put `auto` to use your editor's tab width setting.",
-        "type": ["integer", "string"],
+        "type": [
+          "integer",
+          "string"
+        ],
         "default": "auto",
         "order": 7
       },
@@ -222,16 +236,22 @@
         "description": "Print trailing commas wherever possible.",
         "type": "string",
         "default": "none",
-        "enum": ["none", "es5", "all"],
+        "enum": [
+          "none",
+          "es5",
+          "all"
+        ],
         "order": 8
       },
       "parser": {
         "title": "JavaScript Parser",
-        "description":
-          "Choose which [supported parser](https://www.npmjs.com/package/prettier#language-support) to use. (Does not apply to TypeScript, CSS or JSON)",
+        "description": "Choose which [supported parser](https://www.npmjs.com/package/prettier#language-support) to use. (Does not apply to TypeScript, CSS or JSON)",
         "type": "string",
         "default": "babylon",
-        "enum": ["babylon", "flow"],
+        "enum": [
+          "babylon",
+          "flow"
+        ],
         "order": 9
       },
       "arrowParens": {
@@ -239,7 +259,10 @@
         "description": "Include parentheses around a sole arrow function parameter.",
         "type": "string",
         "default": "avoid",
-        "enum": ["avoid", "always"],
+        "enum": [
+          "avoid",
+          "always"
+        ],
         "order": 10
       }
     }
diff --git a/dist/editorInterface/index.js b/dist/editorInterface/index.js
index 366276a..90ff1de 100644
--- a/dist/editorInterface/index.js
+++ b/dist/editorInterface/index.js
@@ -7,7 +7,8 @@ var _require = require('../atomInterface'),
     getTypescriptScopes = _require.getTypescriptScopes,
     getJsonScopes = _require.getJsonScopes,
     getGraphQlScopes = _require.getGraphQlScopes,
-    getMarkdownScopes = _require.getMarkdownScopes;
+    getMarkdownScopes = _require.getMarkdownScopes,
+    getVueScopes = _require.getVueScopes;
 
 var flow = void 0;
 var lazyFlow = function lazyFlow() {
@@ -17,7 +18,7 @@ var lazyFlow = function lazyFlow() {
   return flow;
 };
 
-var EMBEDDED_SCOPES = ['text.html.vue', 'text.html.basic'];
+var EMBEDDED_SCOPES = ['text.html.basic'];
 
 var getBufferRange = function getBufferRange(editor) {
   return editor.getBuffer().getRange();
@@ -51,6 +52,10 @@ var isCurrentScopeMarkdownScope = function isCurrentScopeMarkdownScope(editor) {
   return getMarkdownScopes().includes(getCurrentScope(editor));
 };
 
+var isCurrentScopeVueScope = function isCurrentScopeVueScope(editor) {
+  return getVueScopes().includes(getCurrentScope(editor));
+};
+
 var getCurrentFilePath = function getCurrentFilePath(editor) {
   return editor.buffer.file ? editor.buffer.file.path : undefined;
 };
@@ -69,6 +74,7 @@ module.exports = {
   isCurrentScopeJsonScope: isCurrentScopeJsonScope,
   isCurrentScopeGraphQlScope: isCurrentScopeGraphQlScope,
   isCurrentScopeMarkdownScope: isCurrentScopeMarkdownScope,
+  isCurrentScopeVueScope: isCurrentScopeVueScope,
   getCurrentScope: getCurrentScope,
   getCurrentFilePath: getCurrentFilePath,
   getCurrentDir: getCurrentDir
diff --git a/dist/executePrettier/buildPrettierOptions.js b/dist/executePrettier/buildPrettierOptions.js
index d1d287f..63986ea 100644
--- a/dist/executePrettier/buildPrettierOptions.js
+++ b/dist/executePrettier/buildPrettierOptions.js
@@ -14,7 +14,8 @@ var _require = require('../editorInterface'),
     isCurrentScopeCssScope = _require.isCurrentScopeCssScope,
     isCurrentScopeJsonScope = _require.isCurrentScopeJsonScope,
     isCurrentScopeGraphQlScope = _require.isCurrentScopeGraphQlScope,
-    isCurrentScopeMarkdownScope = _require.isCurrentScopeMarkdownScope;
+    isCurrentScopeMarkdownScope = _require.isCurrentScopeMarkdownScope,
+    isCurrentScopeVueScope = _require.isCurrentScopeVueScope;
 
 var _require2 = require('../atomInterface'),
     shouldUseEditorConfig = _require2.shouldUseEditorConfig,
@@ -64,6 +65,10 @@ var buildPrettierOptions = function buildPrettierOptions(editor) {
     optionsFromSettings.parser = 'markdown';
   }
 
+  if (isCurrentScopeVueScope(editor)) {
+    optionsFromSettings.parser = 'vue';
+  }
+
   return (0, _extends3.default)({}, optionsFromSettings, buildEditorConfigOptionsIfAppropriate(editor), getPrettierConfigOptions(editor));
 };
 
diff --git a/package.json b/package.json
index 25fb4e8..e1cdbff 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
     "ignore": "^3.3.7",
     "lodash": "^4.17.4",
     "loophole": "^1.1.0",
-    "prettier": "1.9.2",
+    "prettier": "1.10.2",
     "prettier-eslint": "^8.7.0",
     "prettier-stylelint": "^0.4.2",
     "read-pkg-up": "^3.0.0"
diff --git a/src/atomInterface/index.js b/src/atomInterface/index.js
index 53cc701..2e50e77 100644
--- a/src/atomInterface/index.js
+++ b/src/atomInterface/index.js
@@ -44,6 +44,8 @@ const getGraphQlScopes = () => getConfigOption('formatOnSaveOptions.graphQlScope
 
 const getMarkdownScopes = () => getConfigOption('formatOnSaveOptions.markdownScopes');
 
+const getVueScopes = () => getConfigOption('formatOnSaveOptions.vueScopes');
+
 const getAllScopes = () =>
   [
     getJavascriptScopes(),
@@ -52,6 +54,7 @@ const getAllScopes = () =>
     getJsonScopes(),
     getGraphQlScopes(),
     getMarkdownScopes(),
+    getVueScopes(),
   ].reduce((acc, els) => acc.concat(els));
 
 const getWhitelistedGlobs = () => getConfigOption('formatOnSaveOptions.whitelistedGlobs');
@@ -113,6 +116,7 @@ module.exports = {
   getJsonScopes,
   getGraphQlScopes,
   getMarkdownScopes,
+  getVueScopes,
   getAllScopes,
   getWhitelistedGlobs,
   isDisabledIfNotInPackageJson,
diff --git a/src/config-schema.json b/src/config-schema.json
index c28ed3a..93139a4 100644
--- a/src/config-schema.json
+++ b/src/config-schema.json
@@ -1,24 +1,21 @@
 {
   "useEslint": {
     "title": "ESLint Integration",
-    "description":
-      "Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your Prettier settings based on your ESLint config. If we cannot infer a Prettier setting from your ESLint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.<br><br>**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
+    "description": "Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your Prettier settings based on your ESLint config. If we cannot infer a Prettier setting from your ESLint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.<br><br>**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
     "type": "boolean",
     "default": false,
     "order": 1
   },
   "useStylelint": {
     "title": "Stylelint Integration",
-    "description":
-      "Use [prettier-stylelint](https://github.com/hugomrdias/prettier-stylelint) to infer your Prettier settings based on your Stylelint config. If we cannot infer a Prettier setting from your Stylelint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.",
+    "description": "Use [prettier-stylelint](https://github.com/hugomrdias/prettier-stylelint) to infer your Prettier settings based on your Stylelint config. If we cannot infer a Prettier setting from your Stylelint config (or if there is none in the current project), we will fallback to using your settings in the *Prettier Options* section.",
     "type": "boolean",
     "default": false,
     "order": 2
   },
   "useEditorConfig": {
     "title": "EditorConfig Integration",
-    "description":
-      "Use [EditorConfig](http://editorconfig.org/) configuration to load project-based settings for Prettier formatting.<br>Takes precedence over your settings. The following settings will be overriden if they are found in your `.editorconfig`: **Use tabs**, **Tab width**, **Print width**.",
+    "description": "Use [EditorConfig](http://editorconfig.org/) configuration to load project-based settings for Prettier formatting.<br>Takes precedence over your settings. The following settings will be overriden if they are found in your `.editorconfig`: **Use tabs**, **Tab width**, **Print width**.",
     "type": "boolean",
     "default": true,
     "order": 3
@@ -51,8 +48,7 @@
       },
       "javascriptScopes": {
         "title": "JavaScript Scopes",
-        "description":
-          "Select which files containing JavaScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing JavaScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
         "default": [
           "source.js",
@@ -70,10 +66,13 @@
       },
       "typescriptScopes": {
         "title": "TypeScript Scopes",
-        "description":
-          "Select which files containing TypeScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing TypeScript should be formatted.<br>Use the command `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.ts", "source.tsx", "source.ts.tsx"],
+        "default": [
+          "source.ts",
+          "source.tsx",
+          "source.ts.tsx"
+        ],
         "items": {
           "type": "string"
         },
@@ -81,8 +80,7 @@
       },
       "cssScopes": {
         "title": "CSS Scopes",
-        "description":
-          "Select which files containing CSS should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing CSS should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
         "default": [
           "source.css",
@@ -99,10 +97,11 @@
       },
       "jsonScopes": {
         "title": "JSON Scopes",
-        "description":
-          "Select which files containing JSON should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing JSON should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.json"],
+        "default": [
+          "source.json"
+        ],
         "items": {
           "type": "string"
         },
@@ -110,10 +109,11 @@
       },
       "graphQlScopes": {
         "title": "GraphQL Scopes",
-        "description":
-          "Select which files containing GraphQL should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing GraphQL should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.graphql"],
+        "default": [
+          "source.graphql"
+        ],
         "items": {
           "type": "string"
         },
@@ -121,46 +121,57 @@
       },
       "markdownScopes": {
         "title": "Markdown Scopes",
-        "description":
-          "Select which files containing Markdown should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "description": "Select which files containing Markdown should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
         "type": "array",
-        "default": ["source.md", "source.gfm", "text.md"],
+        "default": [
+          "source.md",
+          "source.gfm",
+          "text.md"
+        ],
         "items": {
           "type": "string"
         },
         "order": 9
       },
+      "vueScopes": {
+        "title": "Vue Scopes",
+        "description": "Select which files qualify as Vue Single File Components and should be formatted.<br>Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
+        "type": "array",
+        "default": [
+          "text.html.vue"
+        ],
+        "items": {
+          "type": "string"
+        },
+        "order": 10
+      },
       "excludedGlobs": {
         "title": "Exclude (list of globs)",
-        "description":
-          "A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to separate each glob.",
+        "description": "A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to separate each glob.",
         "type": "array",
         "default": [],
-        "order": 10
+        "order": 11
       },
       "whitelistedGlobs": {
         "title": "Include (list of globs)",
-        "description":
-          "A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to separate each glob.<br><br>**Note:** If there are globs in this list, files not matching the globs will not be formatted on save, regardless of other options.",
+        "description": "A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to separate each glob.<br><br>**Note:** If there are globs in this list, files not matching the globs will not be formatted on save, regardless of other options.",
         "type": "array",
         "default": [],
-        "order": 11
+        "order": 12
       },
       "isDisabledIfNotInPackageJson": {
         "title": "Only format if Prettier is found in your project's dependencies",
-        "description":
-          "Only format on save when `prettier` (or `prettier-eslint`/`prettier-eslint-cli` if using *ESLint integration*) is in your project's `package.json` (dependencies or devDependencies)",
+        "description": "Only format on save when `prettier` (or `prettier-eslint`/`prettier-eslint-cli` if using *ESLint integration*) is in your project's `package.json` (dependencies or devDependencies)",
         "type": "boolean",
         "default": false,
-        "order": 12
+        "order": 13
       },
       "isDisabledIfNoConfigFile": {
         "title": "Only format if a Prettier config is found",
-        "description":
-          "Only format on save if we find a `.prettierrc` file (written in YAML or JSON), a `prettier.config.js` file that exports an object, or a 'prettier' key in your `package.json` file. <br><br>**Note:** You must have at least one valid rule in order for your config to be considered present.",
+        "description": "Only format on save if we find a `.prettierrc` file (written in YAML or JSON), a `prettier.config.js` file that exports an object, or a 'prettier' key in your `package.json` file. <br><br>**Note:** You must have at least one valid rule in order for your config to be considered present.",
         "type": "boolean",
         "default": false,
-        "order": 13
+        "order": 14
       }
     }
   },
@@ -213,7 +224,10 @@
       "tabWidth": {
         "title": "Tab Width",
         "description": "Number of spaces to use per tab. Put `auto` to use your editor's tab width setting.",
-        "type": ["integer", "string"],
+        "type": [
+          "integer",
+          "string"
+        ],
         "default": "auto",
         "order": 7
       },
@@ -222,16 +236,22 @@
         "description": "Print trailing commas wherever possible.",
         "type": "string",
         "default": "none",
-        "enum": ["none", "es5", "all"],
+        "enum": [
+          "none",
+          "es5",
+          "all"
+        ],
         "order": 8
       },
       "parser": {
         "title": "JavaScript Parser",
-        "description":
-          "Choose which [supported parser](https://www.npmjs.com/package/prettier#language-support) to use. (Does not apply to TypeScript, CSS or JSON)",
+        "description": "Choose which [supported parser](https://www.npmjs.com/package/prettier#language-support) to use. (Does not apply to TypeScript, CSS or JSON)",
         "type": "string",
         "default": "babylon",
-        "enum": ["babylon", "flow"],
+        "enum": [
+          "babylon",
+          "flow"
+        ],
         "order": 9
       },
       "arrowParens": {
@@ -239,7 +259,10 @@
         "description": "Include parentheses around a sole arrow function parameter.",
         "type": "string",
         "default": "avoid",
-        "enum": ["avoid", "always"],
+        "enum": [
+          "avoid",
+          "always"
+        ],
         "order": 10
       }
     }
diff --git a/src/editorInterface/index.js b/src/editorInterface/index.js
index cbe37d3..778bab0 100644
--- a/src/editorInterface/index.js
+++ b/src/editorInterface/index.js
@@ -8,6 +8,7 @@ const {
   getJsonScopes,
   getGraphQlScopes,
   getMarkdownScopes,
+  getVueScopes,
 } = require('../atomInterface');
 
 let flow;
@@ -18,7 +19,7 @@ const lazyFlow = () => {
   return flow;
 };
 
-const EMBEDDED_SCOPES = ['text.html.vue', 'text.html.basic'];
+const EMBEDDED_SCOPES = ['text.html.basic'];
 
 const getBufferRange = (editor: TextEditor) => editor.getBuffer().getRange();
 
@@ -39,6 +40,8 @@ const isCurrentScopeGraphQlScope = (editor: TextEditor) =>
 const isCurrentScopeMarkdownScope = (editor: TextEditor) =>
   getMarkdownScopes().includes(getCurrentScope(editor));
 
+const isCurrentScopeVueScope = (editor: TextEditor) => getVueScopes().includes(getCurrentScope(editor));
+
 const getCurrentFilePath = (editor: TextEditor) => (editor.buffer.file ? editor.buffer.file.path : undefined);
 
 const getCurrentDir: (editor: TextEditor) => ?string = editor =>
@@ -55,6 +58,7 @@ module.exports = {
   isCurrentScopeJsonScope,
   isCurrentScopeGraphQlScope,
   isCurrentScopeMarkdownScope,
+  isCurrentScopeVueScope,
   getCurrentScope,
   getCurrentFilePath,
   getCurrentDir,
diff --git a/src/executePrettier/buildPrettierOptions.js b/src/executePrettier/buildPrettierOptions.js
index f3b770c..831c85e 100644
--- a/src/executePrettier/buildPrettierOptions.js
+++ b/src/executePrettier/buildPrettierOptions.js
@@ -7,6 +7,7 @@ const {
   isCurrentScopeJsonScope,
   isCurrentScopeGraphQlScope,
   isCurrentScopeMarkdownScope,
+  isCurrentScopeVueScope,
 } = require('../editorInterface');
 const { shouldUseEditorConfig, getPrettierOptions, getAtomTabLength } = require('../atomInterface');
 const buildEditorConfigOptions = require('./buildEditorConfigOptions');
@@ -62,6 +63,10 @@ const buildPrettierOptions = (editor: TextEditor) => {
     optionsFromSettings.parser = 'markdown';
   }
 
+  if (isCurrentScopeVueScope(editor)) {
+    optionsFromSettings.parser = 'vue';
+  }
+
   return {
     ...optionsFromSettings,
     ...buildEditorConfigOptionsIfAppropriate(editor),
diff --git a/yarn.lock b/yarn.lock
index e8f89f4..521b5c8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4777,9 +4777,9 @@ prettier-stylelint@^0.4.2:
     tempy "^0.2.1"
     update-notifier "^2.2.0"
 
-prettier@1.9.2:
-  version "1.9.2"
-  resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"
+prettier@1.10.2:
+  version "1.10.2"
+  resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93"
 
 prettier@^1.7.0:
   version "1.7.0"


Test patch:
diff --git a/src/editorInterface/index.test.js b/src/editorInterface/index.test.js
index 42aaf5f..f144684 100644
--- a/src/editorInterface/index.test.js
+++ b/src/editorInterface/index.test.js
@@ -7,6 +7,7 @@ const {
   getJsonScopes,
   getGraphQlScopes,
   getMarkdownScopes,
+  getVueScopes,
 } = require('../atomInterface');
 const {
   getBufferRange,
@@ -17,6 +18,7 @@ const {
   isCurrentScopeJsonScope,
   isCurrentScopeGraphQlScope,
   isCurrentScopeMarkdownScope,
+  isCurrentScopeVueScope,
   getCurrentFilePath,
 } = require('./index');
 
@@ -171,6 +173,28 @@ describe('isCurrentScopeMarkdownScope()', () => {
   });
 });
 
+describe('isCurrentScopeVueScope()', () => {
+  it('returns true if the current scope is a Vue SFC scope type', () => {
+    const scopeName = 'text.html.vue';
+    const editor = buildMockTextEditor({ getGrammar: () => ({ scopeName }) });
+    getVueScopes.mockImplementation(() => ['text.html.vue']);
+
+    const actual = isCurrentScopeVueScope(editor);
+
+    expect(actual).toBe(true);
+  });
+
+  it('returns false if the current scope is not a Vue SFC scope type', () => {
+    const scopeName = 'text.html.basic';
+    const editor = buildMockTextEditor({ getGrammar: () => ({ scopeName }) });
+    getVueScopes.mockImplementation(() => ['text.html.vue']);
+
+    const actual = isCurrentScopeVueScope(editor);
+
+    expect(actual).toBe(false);
+  });
+});
+
 describe('getCurrentFilePath()', () => {
   it('returns the current file path if there is one', () => {
     const file = { path: 'xyz.js' };
diff --git a/src/executePrettier/buildPrettierOptions.test.js b/src/executePrettier/buildPrettierOptions.test.js
index e58a6cb..6d6d0ef 100644
--- a/src/executePrettier/buildPrettierOptions.test.js
+++ b/src/executePrettier/buildPrettierOptions.test.js
@@ -10,6 +10,8 @@ const {
   isCurrentScopeCssScope,
   isCurrentScopeJsonScope,
   isCurrentScopeGraphQlScope,
+  isCurrentScopeMarkdownScope,
+  isCurrentScopeVueScope,
 } = require('../editorInterface');
 const buildEditorConfigOptions = require('./buildEditorConfigOptions');
 const buildMockEditor = require('../../tests/mocks/textEditor');
@@ -85,6 +87,28 @@ it('uses graphql as the parser if current scope is listed as a GraphQl scope in
   expect(actual).toEqual({ parser: 'graphql' });
 });
 
+it('uses markdown as the parser if current scope is listed as a Markdown scope in settings', () => {
+  const editor = buildMockEditor();
+  const fakePrettierOptions = { parser: 'babylon' };
+  getPrettierOptions.mockImplementation(() => fakePrettierOptions);
+  isCurrentScopeMarkdownScope.mockImplementation(() => true);
+
+  const actual = buildPrettierOptions(editor);
+
+  expect(actual).toEqual({ parser: 'markdown' });
+});
+
+it('uses vue as the parser if current scope is listed as a Vue SFC scope in settings', () => {
+  const editor = buildMockEditor();
+  const fakePrettierOptions = { parser: 'babylon' };
+  getPrettierOptions.mockImplementation(() => fakePrettierOptions);
+  isCurrentScopeVueScope.mockImplementation(() => true);
+
+  const actual = buildPrettierOptions(editor);
+
+  expect(actual).toEqual({ parser: 'vue' });
+});
+
 it('does not use editorconfig options if that setting is not enabled', () => {
   const editor = buildMockEditor();
   getPrettierOptions.mockImplementation(() => ({}));