VsCode C++ Python 配置
扩展
Arm Assembly
- 汇编语法高亮。autoDocstring
- 自动生成 python 注释。Better Comments
- 创建可读性更高的注释以及用不同颜色高亮注释。Black Formatter
- 使用black
格式化 python 代码。C/C++
- C/C++ 语法支持,智能提示以及高亮。Chinese Language
- 简体中文语言包。Cmake
- Cmake支持。Community Material Theme
- Material 主题社区版。DeviceTree
- 设备树语法支持以及高亮。Doxygen Documentation Generator
- 快捷生成 doxygen 风格注释。Git Graph
- 查看 git graph。Git History
- 查看 git log, file history。GitLens
- 多方面提升 git 使用体验。Hex Editor
- 以16进制形式编辑文件。indent-rainbow
- 更好的显示缩进。Kconfig
- kconfig 和 kbuild 语法高亮。MarkDown All in one
- markdown 语法支持以及高亮。markdownlint
- markdown 语法检查。Material Icon Theme
- 超好看的文件图标。Python
- python 扩展。Python Indent
- 修正 python 缩进Python Type Hint
- python 类型提示Remote - SSH
- SSH 服务。Remote Explorer
- 查看 SSH 远端设备。Remote x11
- 启用 X11 转发与远程 SSH 扩展,可通过 SSH 显示远端界面。Trailing Spaces
- 显示多余的空格以及一键去除多余空格。Vim
- vim 扩展。
配置
C/C++
扩展配置,ctrl + shift + p
,输入C/C++
, 选择编辑配置(UI)
,可根据不同的项目更改以下几项:- 编译器路径
- 编译器参数
- 包含路径
- 定义
- C++ 标准
C/C++
代码风格配置(适配华为C++语言编程规范)定位到文件->首选项->设置
,输入format
,找到扩展->C/C++->格式设置
,设置以下格式(没提到的保留原样):C_Cpp > Formatting
->vcFormat
C_Cpp > Vc Format > indent: multiLineRelativeTo
->statementBegin
C_Cpp > Vc Format > indent: Within Parentheses
->aligenToParenthesis
C_Cpp > Vc Format > New Line: Before Catch
->取消选中
C_Cpp > Vc Format > New Line: Before Else
->取消选中
C_Cpp > Vc Format > New Line:Before Open Brace: block
->sameLine
C_Cpp > Vc Format > New Line:Before Open Brace: Function
->newLine
C_Cpp > Vc Format > New Line:Before Open Brace: Namespace
->sameLine
C_Cpp > Vc Format > New Line:Before Open Brace: Type
->sameLine
C_Cpp > Vc Format > New Line:Before Open Brace: Lambda
->sameLine
C_Cpp > Vc Format > Space: Pointer Reference Alignment
->left
- 终端显示行数配置:
文件->首选项->设置
,输入scrollback
,修改Terminal > Integrated:Scrollback
导入配置
- vscode_settings.code-profile,该设置包含了上述所有需要安装的插件以及配置
- 导入方法:
文件->首选项->配置文件->导入配置文件