简体   繁体   English

有没有办法防止VSCode自动格式化在问号和单词之间添加空格

[英]Is there a way to prevent VSCode auto-formatting from adding a space between question marks and words

VSCode auto-formatting keeps adding a space between question marks in my type specification of my React class. VSCode 自动格式化在我的 React 类的类型规范中不断在问号之间添加一个空格。

I think it only started happening in the new version of VSCode March 2019 (version 1.33), but I may be wrong我认为它只在 2019 年 3 月的新版 VSCode(1.33 版)中才开始发生,但我可能错了

I use a reactjs + flowtype stack in VSCode and the following change happens on format.我在 VSCode 中使用了 reactjs + flowtype 堆栈,格式发生了以下变化。

class IdPRPConfigC extends React.Component<{file: ?string}, {}> {}

Becomes成为

class IdPRPConfigC extends React.Component<{file: ? string}, {}> {

Note that a space was inserted after the optional flag (?).请注意,在可选标志 (?) 之后插入了一个空格。

我安装了名为“自动关闭标签”的扩展程序,它正在编辑我的配置以在问号之间放置空格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM