你如何无法在 vscode 上使用更漂亮的自动多行? [英] How do you unable auto multi-line on vscode with prettier?

查看:38
本文介绍了你如何无法在 vscode 上使用更漂亮的自动多行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢 Prettier 中的所有功能,但自动多行很烦人.可以关掉吗?

I like all the features in Prettier but having auto multi-lines is annoying. Is it possible to have it turned off?

就像添加多个 CSS 选择器和 HTML 属性一样,我想将它们放在一行中,而不是将每个选择器/属性都放在自己的一行上.

like when adding multiple CSS selectors and HTML attributes, I want to keep them in one line instead of having each selector/attribute on its own line.

例如,在 CSS 上我希望它看起来像这样

for example, on CSS I want it to look like this

h1, h2 {
  color: #1B3E66;
}

而不是在保存时自动执行此操作

instead of automatically doing this on save

h1,
h2 {
  color: #1B3E66;
}

推荐答案

这是不可能的.Prettier 只有一组非常有限的配置,这不是其中之一.有关 prettier 的完整配置选项,请参阅:https://prettier.io/docs/en/options.html

This is not possible. Prettier has only a very limited set of configurations and this is not one of them. For the full config options for prettier see: https://prettier.io/docs/en/options.html

这篇关于你如何无法在 vscode 上使用更漂亮的自动多行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆