Option to let Prettier format files with additional extensions? (e.g. .eex)
See original GitHub issueI need to format .html.eex
files, which are view templates for Elixir. They are mostly HTML anyways, and if I manually change the language to HTML then run Prettier, the output seems fine.
Is there a way to let .html.eex
be treated like .html
files by Prettier? For now I’ve only seen options to disable formatting certain extensions/languages, but not enable formatting on additional extensions.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Options - Prettier
If you change any options, it's recommended to do it via a configuration file. This way the Prettier CLI, editor integrations and other...
Read more >Prettier not formatting HTML files in VS Code - Stack Overflow
Set the formatter in dropdown (esbenp.prettier-vscode) for prettier. this can change if you are using any other formatter. Share.
Read more >Code Formatting with Prettier in Visual Studio Code - YouTube
Formatting your code can be a hassle. Learn how to have your code automatically formatted to save yourself a lot of time and...
Read more >Prettier extension for Visual Studio code - deBUG.to
"Format on save" to apply the format when you save your file. formatter setting. Simple example. Below is an example for a code...
Read more >How to configure Prettier and VSCode - Gleb Bahmutov
Formatting every file as you save it is nice, but we can also format ALL source files at once using Prettier CLI. In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also having issues with handlebars (*.hbs) files. I would like prettier to format them as html, but not change the language association in vscode due to syntax highlighting. I was hoping to use an override in my
.prettierrc.json
file like this:But this doesn’t work. Does this extension honor the “overrides” key in prettier config files?
I can get the formatting to work using the following in my vscode user settings:
But, again, this turns off my syntax highlighting for
{{variables}}
,{{> blocks}}
, etc… It would be much nicer to do this through the prettier config, if possible.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.