-
I installed the official go extension in VS Code all the necessary executables are installed, the problem is when I am writing my code their is this weird thing that deletes my code all the time and I cannot stop it.... gopls.mp4I think its something to do with the settings but I don't know how to set them.... 🥵 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Deleting unused imports is the default behavior to help saved files can compile - In Go, unused imports are compile-time errors. For different behavior, follow the instruction in "Formatting Code and Organizing Imports". "[go]": { "editor.codeActionsOnSave": { "source.organizeImports": false }} |
Beta Was this translation helpful? Give feedback.
Deleting unused imports is the default behavior to help saved files can compile - In Go, unused imports are compile-time errors.
For different behavior, follow the instruction in "Formatting Code and Organizing Imports".
"[go]": { "editor.codeActionsOnSave": { "source.organizeImports": false }}