devcontainer.json 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // https://containers.dev/
  2. {
  3. "name": "[ Golang 工具库 ]",
  4. "service": "go_kit",
  5. "dockerComposeFile": "../docker-compose.yml",
  6. "workspaceFolder": "/workspace",
  7. "shutdownAction": "none", // none,stopContainer,stopCompose
  8. "postCreateCommand": "cd /workspace/_init && sh ./init",
  9. "remoteEnv": {
  10. "HTTP_PROXY": "http://host.docker.internal:7890",
  11. "HTTPS_PROXY": "http://host.docker.internal:7890",
  12. "NO_PROXY": "localhost,127.0.0.1,host.docker.internal"
  13. },
  14. "customizations": {
  15. "vscode": {
  16. "settings": {
  17. // 禁用 SSL 验证(如果你在使用代理服务器时遇到证书问题)
  18. "http.proxyStrictSSL": false,
  19. // 从 http 和 https 位置提取 JSON 架构
  20. "json.schemaDownload.enable": false,
  21. // 设置 Markdown 文件使用默认编辑器打开
  22. "workbench.editorAssociations": {
  23. "*.md": "default",
  24. "*.markdown": "default"
  25. },
  26. // 设置制表符宽度为 2 个空格
  27. "editor.tabSize": 2,
  28. // 设置 Go 语言格式化工具为 gofmt
  29. "go.formatTool": "gofmt",
  30. // 设置 Go 测试标志,禁用测试缓存
  31. "go.testFlags": ["-count=1"]
  32. },
  33. "extensions": [
  34. // AI 助手
  35. "MarsCode.marscode-extension",
  36. // GoLang
  37. "golang.go",
  38. // Database Client JDBC
  39. "cweijan.dbclient-jdbc",
  40. // MySQL Client
  41. "cweijan.vscode-mysql-client2",
  42. // MySQL语法高亮 & 代码片段
  43. "zendobk.mysql",
  44. // 在 VSCode 中显示 PDF 文件
  45. "tomoki1207.pdf",
  46. // Office Viewer
  47. "cweijan.vscode-office",
  48. // 快捷键绑定
  49. "ms-vscode.sublime-keybindings",
  50. // 多行文本对齐
  51. "yo1dog.cursor-align",
  52. // 文本互换
  53. "davidmart.swap-word",
  54. // Git Graph
  55. "mhutchie.git-graph",
  56. // .env 文件语法支持
  57. "mikestead.dotenv"
  58. ]
  59. }
  60. }
  61. }