VSC 使用Clang-format 时报错:write EPIPE而不能使用自动格式

我的梦境 提交于 2019-12-06 16:13:05

问题

 VSC 1.34.0 使用Clang-format 时报错:write EPIPE而不能使用自动格式

解决方法

填写clang-format运行位置的绝对路径

"clang-format.executable" : "C: \\ Users \\ Administrator \\ .vscode \\ extensions \\ ms-vscode.cpptools-0.23.1 \\ LLVM \\ bin \\ clang-format"
}

 

我的配置

当前路径下创建文件:.clang-format, 内容如下:

# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# The .clang-format file uses YAML format:
# Example of usage:
BreakBeforeBraces: Custom
BraceWrapping:
  AfterEnum: true
  AfterStruct: false
  SplitEmptyFunction: false
AlignConsecutiveAssignments: true
AlignOperands: true
AllowShortLoopsOnASingleLine   : true
AlwaysBreakBeforeMultilineStrings : false
AlwaysBreakTemplateDeclarations : true
SpaceBeforeAssignmentOperators : true
SpacesBeforeTrailingComments : 3
TabWidth : 2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!