gpt4 book ai didi

visual-studio-code - 在 VS Code 中使用 Prettier 格式化 .ejs 文件

转载 作者:行者123 更新时间:2023-12-03 20:28:19 25 4
gpt4 key购买 nike

我想通过添加自定义规则来使用 prettier 来格式化我的 ejs 文件。

现在我正在为 ejs 文件使用 html 的文件关联。

我在 settings.json 文件中添加了以下代码:
“files.associations”:{
"*.ejs": "html"
},

最佳答案

不幸的是,Prettier 目前不支持 EJS。支持的语言列表在他们的文档中列出 https://prettier.io/docs/en/index.html

但是,他们确实支持插件,因此有人可以添加支持 https://prettier.io/docs/en/plugins.html

关于visual-studio-code - 在 VS Code 中使用 Prettier 格式化 .ejs 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56141931/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com