question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for additional file types

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ntottencommented, Aug 26, 2020

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

1reaction
cj81499commented, Jun 3, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found