typescript - IntelliJ - 有没有办法防止自动格式化程序折叠数组中项目之间的空格?
问题描述
在我的项目中,我们有一些数据是二维数组的区域,我们喜欢将列排列起来,以便于查看哪些数据在哪一列中。例如:
iit("returns #expected if input is #input", (test) => {
expect(subject.apply(test.input)).to.equal(test.expected)
}).where([
["input", "expected"],
[null, "" ],
[undefined, "" ],
[[], "" ],
[7, 42 ],
})
但是,IntelliJ 的自动格式化程序喜欢删除数组中项目之间的空格,将上面的内容转换为:
iit("returns #expected if input is #input", (test) => {
expect(subject.apply(test.input)).to.equal(test.expected)
}).where([
["input", "expected"],
[null, ""],
[undefined, ""],
[[], ""],
[7, 42],
})
这可读性较差。有没有办法配置自动格式化程序在这种情况下单独留下空格?
我们的主要目标语言是 TypeScript,但它在 Java 或一般情况下也很方便。我已经探索了 IntelliJ 设置的 Editor -> Code Style 部分,但没有找到任何东西,也没有通过搜索引擎找到任何答案。
解决方案
没有办法做到这一点,请投票给WEB-41045以通知此功能的任何进展
推荐阅读
- inno-setup - Inno Setup 无法处理带有空格的源路径
- javascript - 如何仅更新部分状态
- python - 当我添加 PushButtons 时,KeyPressEvent() 不适用于标签
- c++ - Tensorflow 默认如何使用 CPU 内核?
- stm32 - MPU6050 在地址 0x68 上没有响应,但出现在 I2C 扫描地址中
- c# - 使用 PostMessage 模拟鼠标点击
- python-3.x - 如果循环在不需要时重复自身
- excel - 防止小数的 VBA 输入框
- javascript - javascript网页未在前台模式下接收通知,尽管在后台接收(仅数据消息)
- sql - 在 SQL Server 中的 select concat 语句中包含引号