Support for additional file types
See original GitHub issueIs your feature request related to a problem? Please describe.
I would like to use prettier on .njk files with the html parser. It works when I run npx prettier **/*.njk --parser html
, but (as far as I can tell), there is no way to set this up in the .prettierrc file.
Describe the solution you’d like A clear and concise description of what you want to happen. I think the simplest solution would be to support arbitrary file types in the overrides section of the .prettierrc file. For example:
{
"overrides": [
{
"files": "*.njk",
"options": { "parser": "html" }
}
]
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Adding OCR Support for Additional File Types
Adding OCR Support for Additional File Types ... You can enable content indexing and entity detection for images in additional file types.
Read more >File types supported - Microsoft Information Protection SDK
The supported file formats for these file types are the 97-2003 file formats and Office Open XML formats for the following Office programs:...
Read more >How to Add Additional File Types to Be Uploaded in ...
It's one of the best file upload plugins and is the easiest way to add support for additional file types to WordPress.
Read more >How to Allow Additional File Types in WordPress (Examples)
Can't figure out how to allow additional file types in your WordPress forms? Using our File Uploads plugin, you can do this easily!...
Read more >Supported File Extensions
Introduction: Supported File Extensions · *.pdf document · *.txt text · *.rtf rich text · *.csv comma separated value · *.c C program...
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
This feature is now supported in 5.3.0. You can register custom glob paths for the extension to provide formatting for. See: https://github.com/prettier/prettier-vscode#prettierdocumentselectors
This doesn’t solve my problem. I’d like vscode to syntax highlight as a
.njk
file, but format as though it were an.html
file, which (unless I’m misunderstanding your writing) still isn’t possible.