vscode 配置问题
来源:1-5 vscode 的安装和配置
零点一吨微胖
2021-02-14
vsocde中使用过程中报错
Error loading workspace: gopls requires a module at the root of your workspace. You can work with multiple modules by opening each one as a workspace folder. Improvements to this workflow will be coming soon, and you can learn more here: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md.
写回答
1回答
-
ccmouse
2021-02-21
vscode用那个叫gopls的工具来提供代码提示。gopls要求"root of your workspace"有go.mod。
我们需要确保左边目录树里打开的目录,顶端是含有go.mod的那个目录。
比如我的源码在https://git.imooc.com/coding-180/coding-180, coding-180下面有go.mod,那vscode必须打开coding-180目录。
00
相似问题