【问题标题】:Prettier is not formatting C++ in VS codePrettier 没有在 VS 代码中格式化 C++
【发布时间】:2021-10-21 18:54:53
【问题描述】:

Prettier 没有在 VS 代码中格式化 c++ 代码。我必须在代码中手动输入缩进。我会撒谎知道如何解决这个问题。如果不可能,有人可以建议 c++ 的代码格式化程序

【问题讨论】:

    标签: c++ visual-studio-code formatting prettier


    【解决方案1】:

    Prettier 并非旨在格式化 C++ 代码。你应该安装微软开发的C/C++ for Visual Studio Code扩展,它支持代码格式化。

    详情请见Visual Studio Code documentation

    【讨论】:

    • 它仍然告诉我按 ALT+SHIFT+F 时没有安装 cpp 文件的格式化程序
    • 有什么办法可以让 Prettier 作为默认代码格式化程序和 C++ 的不同代码格式化程序?
    猜你喜欢
    • 2019-03-06
    • 2021-07-10
    • 2021-08-31
    • 2020-10-27
    • 2021-01-05
    • 2020-01-14
    • 2021-07-04
    • 2019-03-15
    • 2021-04-24
    相关资源
    最近更新 更多