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
}
相关推荐
梦幻通灵7 小时前
IDEA通过Contince接入Deepseek
java·ide·intellij-idea
鸡啄米的时光机7 小时前
vscode的一些实用操作
vscode·学习
Aphelios38010 小时前
Linux 下 VIM 编辑器学习记录:从基础到进阶(上)
java·linux·编辑器·vim
灰色人生qwer11 小时前
React + TypeScript+ Vite 配置路径别名和vscode智能路径提示
vscode·react.js·typescript
workflower12 小时前
实例研究:设计一个文档编辑器(24)- 完
java·开发语言·设计模式·编辑器·软件工程·需求分析·软件需求
莲动渔舟12 小时前
赶AI大潮:在VSCode中使用DeepSeek及近百种模型的极简方法
ide·人工智能·vscode·deepseek
咩咩大主教13 小时前
VSCode运行Go程序报错:Unable to process `evaluate`: debuggee is running
开发语言·ide·vscode·golang·编辑器
佛曰我不想说话13 小时前
通过VSCode直接连接使用 GPT的编程助手
ide·vscode·copilot
羊村懒哥16 小时前
VScode内接入deepseek包过程(本地部署版包会)
人工智能·vscode·deepseek