当前位置:网站首页>vscode config

vscode config

2022-06-26 05:09:00 古路

0.插件

  • C/C++
  • C++ Intellisense
  • Doxygen Documentation Generator
  • Msg Language Support
  • XML Tools
  • Todo Tree: 注释的高亮显示
  • Chinese (Simplified)
  • CMake
  • CMake Tools
  • Comment Translate
  • Draw.io Integration (画流程图)
  • Drawio Preview
  • indent-rainbow(显示空格)
  • LeetCode
  • PlantUML(画类图)
  • ROS

1.seetings.json

{
    
  "doxdocgen.generic.paramTemplate": "@param[in] {param} ",

  // 在注释中搜索以 * // , # , ; , 开头的标签! -- 或 / * 
  "todo-tree.regex.regex": "((\\*|//|#|<!--|;|/\\*|^)\\s*($TAGS):|^\\s*- \\[ \\])",
  
  "todo-tree.highlights.defaultHighlight": {
    
    "icon": "alert",
    "type": "text",
    "foreground": "red",
    "iconColour": "green"
  },
  "todo-tree.general.tags": [
    "?",
    "!",
    "param",
    "Step",
    "c++11",
    "note",
    "tag",
    "todo",
  ],
  "todo-tree.highlights.customHighlight": {
    
    "?": {
    
      "icon": "question",
      "foreground": "yellow",
      "iconColour": "yellow",
      "type": "text-and-comment"
    },
    "!": {
    
      "foreground": "red",
      "icon": "issue-opened",
      "iconColour": "red",
      "type": "text-and-comment"
    },
    "Step": {
    
      "foreground": "#7CFC00",
      "icon": "question",
      "iconColour": "green",
      "type": "text-and-comment",
      "hideFromTree": true
    },
    "c++11": {
    
      "icon": "tag",
      "foreground": "violet",
      "rulerColour": "violet",
      "iconColour": "violet",
      "type": "text-and-comment",
    },
    "note": {
    
      "icon": "note",
      "foreground": "orange",
      "rulerColour": "orange",
      "iconColour": "orange",
      "type": "text-and-comment",
    },
    "param": {
    
      "icon": "issue-closed",
      "foreground": "orange",
      "rulerColour": "orange",
      "iconColour": "orange",
      "type": "text-and-comment",
    },
    "tag": {
    
      "icon": "tag",
      "foreground": "#7CFC00",
      "rulerColour": "#7CFC00",
      "iconColour": "#7CFC00",
      "rulerLane": "full",
      "type": "text-and-comment",
    },
    "todo": {
    
      "foreground": "#f90",
      "rulerColour": "#f90",
      "iconColour": "#f90",
      "type": "text-and-comment",
    },
    
  },
  "python.autoComplete.extraPaths": [
    "/opt/ros/kinetic/lib/python2.7/dist-packages"
  ],
  "todo-tree.tree.showBadges": false,
  "todo-tree.general.revealBehaviour": "highlight todo",
  "todo-tree.tree.showCountsInTree": true,
  "todo-tree.filtering.excludeGlobs": [
    "**/*.txt",
    "**/*.md"
  ],
  "files.associations": {
    
    "*.cc": "cpp",
    "vector": "cpp",
    "mutex": "cpp",
    "list": "cpp",
    "xtree": "cpp",
    "map": "cpp",
    "algorithm": "cpp",
    "bitset": "cpp",
    "cctype": "cpp",
    "chrono": "cpp",
    "cmath": "cpp",
    "concepts": "cpp",
    "cstdarg": "cpp",
    "cstddef": "cpp",
    "cstdint": "cpp",
    "cstdio": "cpp",
    "cstdlib": "cpp",
    "cstring": "cpp",{
    
  "doxdocgen.generic.paramTemplate": "@param[in] {param} ",

  // 在注释中搜索以 * // , # , ; , 开头的标签! -- 或 / * 
  "todo-tree.regex.regex": "((\\*|//|#|<!--|;|/\\*|^)\\s*($TAGS):|^\\s*- \\[ \\])",
  
  "todo-tree.highlights.defaultHighlight": {
    
    "icon": "alert",
    "type": "text",
    "foreground": "red",
    "iconColour": "green"
  },
  "todo-tree.general.tags": [
    "?",
    "!",
    "param",
    "Step",
    "c++11",
    "note",
    "tag",
    "todo",
  ],
  "todo-tree.highlights.customHighlight": {
    
    "?": {
    
      "icon": "question",
      "foreground": "yellow",
      "iconColour": "yellow",
      "type": "text-and-comment"
    },
    "!": {
    
      "foreground": "red",
      "icon": "issue-opened",
      "iconColour": "red",
      "type": "text-and-comment"
    },
    "Step": {
    
      "foreground": "#7CFC00",
      "icon": "question",
      "iconColour": "green",
      "type": "text-and-comment",
      "hideFromTree": true
    },
    "c++11": {
    
      "icon": "tag",
      "foreground": "violet",
      "rulerColour": "violet",
      "iconColour": "violet",
      "type": "text-and-comment",
    },
    "note": {
    
      "icon": "note",
      "foreground": "orange",
      "rulerColour": "orange",
      "iconColour": "orange",
      "type": "text-and-comment",
    },
    "param": {
    
      "icon": "issue-closed",
      "foreground": "orange",
      "rulerColour": "orange",
      "iconColour": "orange",
      "type": "text-and-comment",
    },
    "tag": {
    
      "icon": "tag",
      "foreground": "#7CFC00",
      "rulerColour": "#7CFC00",
      "iconColour": "#7CFC00",
      "rulerLane": "full",
      "type": "text-and-comment",
    },
    "todo": {
    
      "foreground": "#f90",
      "rulerColour": "#f90",
      "iconColour": "#f90",
      "type": "text-and-comment",
    },
    
  },
  "python.autoComplete.extraPaths": [
    "/opt/ros/kinetic/lib/python2.7/dist-packages"
  ],
  "todo-tree.tree.showBadges": false,
  "todo-tree.general.revealBehaviour": "highlight todo",
  "todo-tree.tree.showCountsInTree": true,
  "todo-tree.filtering.excludeGlobs": [
    "**/*.txt",
    "**/*.md"
  ],
  "files.associations": {
    
    "*.cc": "cpp",
    "vector": "cpp",
    "mutex": "cpp",
    "list": "cpp",
    "xtree": "cpp",
    "map": "cpp",
    "algorithm": "cpp",
    "bitset": "cpp",
    "cctype": "cpp",
    "chrono": "cpp",
    "cmath": "cpp",
    "concepts": "cpp",
    "cstdarg": "cpp",
    "cstddef": "cpp",
    "cstdint": "cpp",
    "cstdio": "cpp",
    "cstdlib": "cpp",
    "cstring": "cpp",
    "ctime": "cpp",
    "cwchar": "cpp",
    "deque": "cpp",
    "exception": "cpp",
    "fstream": "cpp",
    "initializer_list": "cpp",
    "iomanip": "cpp",
    "ios": "cpp",
    "iosfwd": "cpp",
    "iostream": "cpp",
    "istream": "cpp",
    "iterator": "cpp",
    "limits": "cpp",
    "memory": "cpp",
    "new": "cpp",
    "numeric": "cpp",
    "ostream": "cpp",
    "queue": "cpp",
    "ratio": "cpp",
    "set": "cpp",
    "sstream": "cpp",
    "stack": "cpp",
    "stdexcept": "cpp",
    "streambuf": "cpp",
    "string": "cpp",
    "system_error": "cpp",
    "thread": "cpp",
    "tuple": "cpp",
    "type_traits": "cpp",
    "typeinfo": "cpp",
    "unordered_map": "cpp",
    "utility": "cpp",
    "xfacet": "cpp",
    "xhash": "cpp",
    "xiosbase": "cpp",
    "xlocale": "cpp",
    "xlocinfo": "cpp",
    "xlocmon": "cpp",
    "xlocnum": "cpp",
    "xloctime": "cpp",
    "xmemory": "cpp",
    "xstddef": "cpp",
    "xstring": "cpp",
    "xtr1common": "cpp",
    "xutility": "cpp",
    "clocale": "cpp",
    "cwctype": "cpp",
    "array": "cpp",
    "atomic": "cpp",
    "hash_map": "cpp",
    "hash_set": "cpp",
    "strstream": "cpp",
    "*.tcc": "cpp",
    "cinttypes": "cpp",
    "complex": "cpp",
    "condition_variable": "cpp",
    "forward_list": "cpp",
    "unordered_set": "cpp",
    "functional": "cpp",
    "optional": "cpp",
    "string_view": "cpp",
    "cfenv": "cpp",
    "typeindex": "cpp",
    "core": "cpp",
    "csignal": "cpp",
    "any": "cpp",
    "future": "cpp",
    "memory_resource": "cpp",
    "random": "cpp",
    "bit": "cpp",
    "*.inc": "cpp"
  },
  "python.autoComplete.extraPaths": [
    "/opt/ros/kinetic/lib/python2.7/dist-packages"
  ],
  "python.analysis.extraPaths": [
    "/opt/ros/kinetic/lib/python2.7/dist-packages"
  ]
}
    "ctime": "cpp",
    "cwchar": "cpp",
    "deque": "cpp",
    "exception": "cpp",
    "fstream": "cpp",
    "initializer_list": "cpp",
    "iomanip": "cpp",
    "ios": "cpp",
    "iosfwd": "cpp",
    "iostream": "cpp",
    "istream": "cpp",
    "iterator": "cpp",
    "limits": "cpp",
    "memory": "cpp",
    "new": "cpp",
    "numeric": "cpp",
    "ostream": "cpp",
    "queue": "cpp",
    "ratio": "cpp",
    "set": "cpp",
    "sstream": "cpp",
    "stack": "cpp",
    "stdexcept": "cpp",
    "streambuf": "cpp",
    "string": "cpp",
    "system_error": "cpp",
    "thread": "cpp",
    "tuple": "cpp",
    "type_traits": "cpp",
    "typeinfo": "cpp",
    "unordered_map": "cpp",
    "utility": "cpp",
    "xfacet": "cpp",
    "xhash": "cpp",
    "xiosbase": "cpp",
    "xlocale": "cpp",
    "xlocinfo": "cpp",
    "xlocmon": "cpp",
    "xlocnum": "cpp",
    "xloctime": "cpp",
    "xmemory": "cpp",
    "xstddef": "cpp",
    "xstring": "cpp",
    "xtr1common": "cpp",
    "xutility": "cpp",
    "clocale": "cpp",
    "cwctype": "cpp",
    "array": "cpp",
    "atomic": "cpp",
    "hash_map": "cpp",
    "hash_set": "cpp",
    "strstream": "cpp",
    "*.tcc": "cpp",
    "cinttypes": "cpp",
    "complex": "cpp",
    "condition_variable": "cpp",
    "forward_list": "cpp",
    "unordered_set": "cpp",
    "functional": "cpp",
    "optional": "cpp",
    "string_view": "cpp",
    "cfenv": "cpp",
    "typeindex": "cpp",
    "core": "cpp",
    "csignal": "cpp",
    "any": "cpp",
    "future": "cpp",
    "memory_resource": "cpp",
    "random": "cpp",
    "bit": "cpp",
    "*.inc": "cpp"
  },
  "python.autoComplete.extraPaths": [
    "/opt/ros/kinetic/lib/python2.7/dist-packages"
  ],
  "python.analysis.extraPaths": [
    "/opt/ros/kinetic/lib/python2.7/dist-packages"
  ]
}

2.tasks.json

{
    
    // See https://go.microsoft.com/fwlink/?LinkId=733558 
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
    
            "label": "catkin_make",
            "type": "shell",
            "command": "catkin_make_isolated --install --use-ninja", // catkin_make
            "args": [],
            "group": {
    
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
    
                "reveal": "always"
            },
            "problemMatcher": "$msCompile"
        },
    ]
}

3.launch.json

{
    
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
    
            "name": "(gdb) Launch test_code",         // 配置名称, 将会在调试配置下拉列表中显示
            "type": "cppdbg",               // 调试器类型 该值自动生成 
            "request": "launch",            // 调试方式,还可以选择attach 
            "program": "${workspaceRoot}/devel/lib/beginner_tutorials/test_node",     //要调试的程序(完整路径, 支持相对路径)
            "args": [],                     // 传递给上面程序的参数, 没有参数留空即可
            "stopAtEntry": false,           // 是否停在程序入口点(停在main函数开始)
            "cwd": "${workspaceFolder}",    // 调试程序时的工作目录
            "environment": [],              // 针对调试的程序, 要添加到环境中的环境变量. 例如: [ { "name": "squid", "value": "clam" } ]
            "externalConsole": false,       // 如果设置为true, 则为应用程序启动外部控制台. 如果为false, 则不会启动控制台, 并使用VS Code的内置调试控制台.
            "MIMode": "gdb",                // VSCode要使用的调试工具
            "setupCommands": [
                {
    
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

4.c_cpp_properties.json

{
    
    "configurations": [
        {
    
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64",
            "compileCommands": "${workspaceFolder}/build_isolated/cartographer/install/compile_commands.json"
        }
    ],

    "version": 4
}
原网站

版权声明
本文为[古路]所创,转载请带上原文链接,感谢
https://blog.csdn.net/fb_941219/article/details/125442354