-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser for prettier #123
Comments
This is very much on my todo list when i've resolved a few core issues that I'm currently working on. |
Prettier uses the overrides:
- files:
- '*.mdx'
- '*.svx'
options:
parser: markdown |
it would have been great to have something that combines mdx and markdown parsers. Mdx formats everything nicely, but destroys the mdsvex file :) and markdown skips formatting of all svelte markup. In the meantime, on sublime, I setup two formatters. The formatter I use for selections does mdx formatting that I use on markup, and the formatter for the entire buffer uses markdown parser. |
To format
.svx
files I'm usingprettier
with their built-in parser for markdown which isn't ideal since it doesn't touch code such as-- .svx in prettier playground
when the actual javascript should be formatted as
-- javascript in prettier playground
Using the
mdx
parser does not work since it causes multiple syntax errors.I guess we should be able to pass a custom parser to prettier. prettier/prettier#4975 could be used as inspiration.
The text was updated successfully, but these errors were encountered: