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
}
相关推荐
九品神元师30 分钟前
jupyter配置说明
linux·ide·jupyter
无码不欢的我4 小时前
使用vscode在本地和远程服务器端运行和调试Python程序的方法总结
ide·vscode·python
想要打 Acm 的小周同学呀4 小时前
前端Vue2项目使用md编辑器
前端·编辑器·vue2·markdown 语法
PyAIGCMaster5 小时前
ollama部署及实践记录,虚拟环境,pycharm等
linux·ide·pycharm
姓学名生6 小时前
李沐vscode配置+github管理+FFmpeg视频搬运+百度API添加翻译字幕
vscode·python·深度学习·ffmpeg·github·视频
Johaden11 小时前
EXCEL+Python搞定数据处理(第一部分:Python入门-第2章:开发环境)
开发语言·vscode·python·conda·excel
乔宕一15 小时前
在 vscode + cmake + GNU 工具链的基础上配置 JLINK
vscode·gnu·jlink
Le0v1n17 小时前
VSCode注释高亮(# NOTE;# TODO;# FIXME;#XXX;# HACK;# BUG)
ide·vscode·python
cafehaus17 小时前
抛弃node和vscode,如何用记事本开发出一个完整的vue前端项目
前端·vue.js·vscode
susu108301891117 小时前
Android Studio打包APK
android·ide·android studio