After Prettier 3.0, Formatting Chinese with prettier-plugin-zh #15194
nnecec
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
大家好!
我最近开发了一个 prettier 的插件,用于优化中文代码的格式化。在 prettier 3.0 之后,默认不会提供中英文之间增加空格的格式化能力了。这个插件可以在 prettier 3.0 格式化代码时,自动在中文和英文之间添加空格。
这个插件仓库地址是:https://github.com/nnecec/zh
相比官方的 prettier,这个插件提供了以下额外的中文格式化功能:
如果你在使用 prettier 格式化包含中文的代码时遇到问题,欢迎试试我的这个插件。它可以让 prettier 更好地支持中文代码样式的要求。如果你有任何改进建议,也欢迎到 GitHub 仓库提交 Issue 或 PR。感谢大家的支持!
Hello everyone!
I recently developed a Prettier plugin to optimize formatting for Chinese code. This plugin can automatically insert spaces between Chinese and English when formatting code with Prettier 3.0.
The plugin repository is at: https://github.com/nnecec/zh
Compared to the official Prettier, this plugin provides the following additional formatting features for Chinese:
If you have any issues formatting code containing Chinese with Prettier, please give this plugin a try. It helps Prettier better support styling requirements for Chinese code. Feel free to submit Issues or PRs to the GitHub repo if you have any suggestions for improvement. Thank you all for the support!
Beta Was this translation helpful? Give feedback.
All reactions