vscode配置使用 cpplint

标题安装clang-format和cpplint

bash 复制代码
sudo apt-get install clang-format
sudo pip3 install cpplint

标题以下settings.json文件放置xxx/Code/User目录

settings.json

json 复制代码
{
    "sync.forceDownload": false,
    "workbench.sideBar.location": "right",
    "editor.minimap.enabled": false,
    "window.zoomLevel": 2.5,
    "editor.minimap.maxColumn": 150,
    "explorer.confirmDelete": false,
    "extensions.ignoreRecommendations": true,
    "editor.renderWhitespace": "all",
    "security.workspace.trust.untrustedFiles": "open",
    "Lua.telemetry.enable": true,
    "settingsSync.ignoredExtensions": [
        "shan.code-settings-sync"
    ],
    "files.autoSave": "onFocusChange",
    "cpplint.cpplintPath": "/usr/local/bin/cpplint",
    "cpplint.lineLength": 120,
    "cpplint.verbose": 1,
    "cpplint.filters": [
        "-runtime/references,-build/include_subdir,-build/c++11,-build/header_guard,+build/include_what_you_use"
    ],
    "C_Cpp.vcFormat.indent.accessSpecifiers": true,
    "C_Cpp.vcFormat.indent.braces": true,
    "C_Cpp.vcFormat.indent.caseContentsWhenBlock": true,
    "C_Cpp.vcFormat.indent.caseLabels": true,
    "[c]": {
        "editor.formatOnSave": false,
        "editor.quickSuggestions": {
            "comments": false,
            "other": true,
            "strings": false
        },
        "editor.tabSize": 2
    },
    "[cpp]": {
        "editor.formatOnSave": false,
        "editor.tabSize": 2,
        "editor.defaultFormatter": "ms-vscode.cpptools"
    },
    "cmake.configureOnEdit": false,
    "cmake.configureOnOpen": false,
    "C/C++ Include Guard.Comment Style": "Line",
    "C/C++ Include Guard.Macro Type": "Filepath",
    "C/C++ Include Guard.Remove Extension": false,
    "C/C++ Include Guard.Suffix": "_",
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "C/C++ Include Guard.File Path Pascal Case to Snake Case": true,
    "files.refactoring.autoSave": false,
    "C/C++ Include Guard.Auto Update Include Guard": false,
    "editor.accessibilitySupport": "on",
    "editor.tabSize": 2,
    "vscodeGoogleTranslate.preferredLanguage": "Chinese (Simplified)",
    "gitlens.graph.showGhostRefsOnRowHover": false,
    "gitlens.graph.highlightRowsOnRefHover": false,
    "gitlens.graph.statusBar.enabled": false,
    "gitlens.showWelcomeOnInstall": false,
    "gitlens.showWhatsNewAfterUpgrades": false,
    "gitlens.hovers.pullRequests.enabled": false,
    "workbench.editor.enablePreview": false,
    "C_Cpp.clang_format_path": "/usr/bin/clang-format",
    "C_Cpp.formatting": "clangFormat",
    "prettier.embeddedLanguageFormatting": "off",
    "C_Cpp.clang_format_sortIncludes": true,
    "C_Cpp.clang_format_style": "{ BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AllowShortFunctionsOnASingleLine: false}",
    "editor.rulers": [
        120
    ],
    "C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AllowShortFunctionsOnASingleLine: false}",
    "explorer.compactFolders": false,
    "outline.icons": false,
    "explorer.excludeGitIgnore": true,
    "[python]": {
        "editor.formatOnType": true
    },
    "git.ignoredRepositories": [
        "*build/*"
    ],
    "git.repositoryScanIgnoredFolders": [
        "node_modules",
        "build/*"
    ],
    "C_Cpp.files.exclude": {
        "**/.vscode": true,
        "**/.vs": true,
        "build/**": true,
        "thirdparty/**": true,
        "3dparty/**": true,
    },
    "RainbowBrackets.depreciation-notice": false,
    "editor.inlineSuggest.enabled": true
}
相关推荐
一棵开花的树,枝芽无限靠近你15 分钟前
【PPTist】添加PPT模版
前端·学习·编辑器·html
热爱生活的五柒1 小时前
vscode利用ofExtensions插件可以调试单进程Openfoam,但是不能调试mpi多进程案例
ide·vscode·编辑器
小陈phd1 小时前
Vscode LinuxC++环境配置
linux·c++·vscode
界面开发小八哥1 小时前
更高效的Java 23开发,IntelliJ IDEA助力全面升级
java·开发语言·ide·intellij-idea·开发工具
小江村儿的文杰10 小时前
XCode Build时遇到 .entitlements could not be opened 的问题
ide·macos·ue4·xcode
为什么每天的风都这么大11 小时前
Vscode/Code-server无网环境安装通义灵码
ide·vscode·阿里云·编辑器·ai编程·code-server
ahadee14 小时前
蓝桥杯每日真题 - 第19天
c语言·vscode·算法·蓝桥杯
芝麻团坚果16 小时前
对subprocess启动的子进程使用VSCode python debugger
linux·ide·python·subprocess·vscode debugger
写点什么啦16 小时前
[debug]不同的window连接ubuntu的vscode后无法正常加载kernel
linux·vscode·ubuntu·debug
小码ssim17 小时前
IDEA使用tips(LTS✍)
java·ide·intellij-idea