0. 历史
安装 vscode后的plugins:
- go
- vscode-icons
- code runner
- markdown preview github
- markdown auto-open
- vscode snippets 模板文件: https://github.com/Microsoft/vscode-go/blob/master/snippets/go.json
- theme molokai 自带
vscode增加golang debug调试:
xcode-select –install
钥匙链创建证书 dlv-cert
证书签名
1 | cd $GOPATH/src/github.com/derekparker |
我的vscode配置文件
setting.json
1 | { |
launch.json
1 | { |
vscode 遇到的问题
- flag provided but not defined: -goversion
一个是版本原因, 一个是vscode也要修改配置gopath, 坑爹
Thank you, I was able to solve this by running brew uninstall –force go and then downloading the latest installer. Anyone who reads this and wants to use brew you could probably just do brew install go after the forced uninstall. I had to restart my terminal and Gogland after doing this.
- vscode not jump define
1 | "go.useLanguageServer": true, |
- vscode could not launch process: exec: “lldb-server”: executable file not found in $PATH
1 | xcode-select --install |
- vscode jump slow
安装https://github.com/sourcegraph/go-langserver 源码安装 需要 go install
1 | "go.useLanguageServer": true, |
- vscode output window hide go
~/.vscode/扩展包/package.json 找到显示的
1 | "showOutput": "never" |
1. vscode 使用技巧
1.1 列操作
Cmd + Option + 上下箭头,比vim方便多了
2. jetbrain 转移 cursor
2.1 主题
- 搜索 Cold Python Theme for VS Code,使用主题和文件夹
2.2 插件
- Code Runner
- IntelliJ IDEA Keybindings
- GitLens
1 | File Annotations: ${author} ${ago} |
2.3 配置文件
1 | { |