Closed teo-tsirpanis closed 2 years ago
Hi @teo-tsirpanis, thanks for the suggestion. I love your suggestion and I'm up to take your code into the repo. Thanks for reaching out to me!
Hi @teo-tsirpanis, I revisited this issue and I come up with one question. Are you trying to add the disabling auto save option? If not, could you make it toggle option? Thanks!
oh, I realized the #119. I leave comments there.
When the extension automatically inserts a licensing header, it automatically saves the file afterwards.
I propose to discontinue this behavior for two reasons:
First, it violates the separation of concerns. The extension's purpose is to insert license headers, saving files is what the user does, and doing it when it's not asked might degrade user experience on machines with slow storage or remote clients.
Second, the user experience when automatic header insertion is not disabled is horrible. Every time I create a temporary file, VSCode creates a tab for it, and then immediately the extension writes the license header, proceeds to save the file, and I am greeted with a save dialog for a file I never intended to save.
If my proposal is accepted I am willing to submit a pull request to implement it.