Comments (4)
To fix this, you need to install the official astro vscode plugin then configure it as the default formatter for files ending with the .astro
extension in settings.json
After you've installed the plugin, running the Format Document
command on an astro component should warn you and provide a prompt to configure a default formatter. Select astro-build.astro-vscode
and it should automatically configure this for you.
Alternatively, you can do so manually by opening the command palette with ctrl + shift + p
and searching for Preferences: Open Settings (JSON)
(select the command variant corresponding to whichever scope you wish to configure). Add the following key-value pair to the root json object:
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
}
Save and exit and you may need to reload your editor but prettier should recognize astro files and format them as expected.
from prettier-vscode.
Yup, that did solve the issue, thank you! :)
from prettier-vscode.
i think this repo is dead
from prettier-vscode.
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.
from prettier-vscode.
Related Issues (20)
- "prettier.configPath" in vscode's settings.json is ignored HOT 2
- `this.prettierModule.resolveConfigFile is not a function` error when formatting HOT 4
- Prettier not working HOT 1
- The vscode extension is inconsistent with the default value of the prettier configuration file HOT 4
- Inconsistency in line break formatting in Java with Prettier in VS Code
- Ignore `CODEOWNERS` file HOT 1
- semi
- Ability to use/configure Format On Save to work with prettier configs within folders HOT 1
- How to set the `rangeStart` configuration for the `prettier-vscode` extension in VS Code? HOT 2
- Prettier formatting yaml files even though a different formatter is selected... HOT 2
- Notification of breaking api change with v1.92 release of VS Code HOT 1
- Unexpectedly resolving globally installed prettier version HOT 2
- Prettier extesion not working on version 10.4.0 HOT 4
- Markdown formula incorrectly formatted HOT 1
- use prettier's builtin configuration instead of falling back to VS Code configuration when locally installed prettier is used HOT 2
- [FR] `prettier.pluginsPath` HOT 2
- Include PHP Formatting Options In VSCode Extension
- Prettier error spawnSync EINVAL when formatting Apex classes HOT 7
- Option to let prettier determine format options instead of falling back to VSCode settings when project doesn't contain explicit prettier config HOT 4
- Extension causes high cpu load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-vscode.