1
Vscode配置proto插件
source link: https://shingle.me/post/vscode%E9%85%8D%E7%BD%AEproto%E6%8F%92%E4%BB%B6/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Vscode配置proto插件
2019-03-12 11:21:11
约 280 字
预计阅读 1 分钟
2906 次阅读
虽然 proto 的语法就那几种, 不过为了防止在写的过程中太过飘逸导致拼写错误, 还是需要插件加持一下啦. 当然, 最主要的原因是格式化问题, 没有养成习惯的话, 每次手动保持等号两边用空格间隔是很费劲的事.
-
首先安装
clang-format
格式化工具, 一般包管理里自带. mac 就brew installclang-format
-
在 vscode 插件市场搜索安装
clang-format
, 然后在你的设置文件里配置{ "editor.formatOnSave": true, "clang-format.executable": "${workspaceRoot}" }
更具体的可以该看插件的介绍
https://marketplace.visualstudio.com/items?itemName=xaver.clang-format
-
在 vscode 插件市场搜索安装
vscode-proto3
, 插件自带高亮, 快捷键补全等等功能, 格式化功能依赖clang-format
所以前一步已经安装过了.更具体的可以看该插件的介绍
https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK