We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import * as prettier from "prettier"; import * as rustPlugin from "prettier-plugin-rust"; export async function formatMove(content: string, prettierConfigPath?: string): Promise<string> { let config; if (prettierConfigPath) { config = await prettier.resolveConfig(prettierConfigPath); } try { return prettier.format(content, { plugins: [rustPlugin], parser: "rust-parse", printWidth: 120, semi: true, tabWidth: 2, useTabs: false, bracketSpacing: true, ...config, }); } catch (error) { let message; if (error instanceof Error) { message = error.message; } else { message = error; } console.log(chalk.yellow(`Error during output formatting: ${message}`)); return content; } }
Error during output formatting: Couldn't resolve parser "rust-parse" Promise {
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Input code
Output code
Additional context
No response
The text was updated successfully, but these errors were encountered: