ProgrammingRainbow / NvChad-2.5

How to install and configure NvChad
https://www.youtube.com/playlist?list=PLO02jwa2ZaiCwXNyaB_9GrPX4UnaXgXcM
The Unlicense
67 stars 5 forks source link

golang conform #1

Closed jinman0826 closed 1 month ago

jinman0826 commented 1 month ago

Automatically importing packages, and then deleting the packages in the import when saving, I think there may be a bug

ProgrammingRainbow commented 1 month ago

Is it adding an import you need? or didn't need? and then removing it? so that go no longer compiles the program? It kind of sounds like the 3 conform packages are arguing about what to do. I have seen this a lot with nvim since it's a bunch of projects stitched together. The most important thing is, is the code still compiling correctly? If it is then it's down to which one do you want to suppress the action that it's doing.

jinman0826 commented 1 month ago

The packages imported during writing are normal, but when I execute : w, all the imported packages are gone

jinman0826 commented 1 month ago
  1. image
  2. image

ProgrammingRainbow commented 1 month ago

Yeah i see what you mean. It initially is fine but if you then delete it and then try to put it back in again it start deleting it. I have no idea why but i know where it's coming from.

if you remove or comment out this it should fix it. But unneeded imports will not be automatically removed anymore.

        ["goimports-reviser"] = {
            prepend_args = { "-rm-unused" },
        },
jinman0826 commented 1 month ago

you are right, close -rm-ununsed can solve this question , maybe version cause