foxundermoon / vs-shell-format

the shellscript、Dockerfile、properties ...... format extension
MIT License
445 stars 47 forks source link

fix: respect `"editor.formatOnSave": false` #303 #344

Open yutotnh opened 1 year ago

yutotnh commented 1 year ago

Summary

The "editor.formatOnSave": false setting is now respected.

"editor.formatOnSave" is now immediately toggled with or without formatting when changed from True to False or False to True.

resolve #303

Problems that were occurring

When VSCode was started with editor.formatOnSave":true and changed to editor.formatOnSave":false, the formatting continued on saving after the change.

When VSCode was restarted, formatting on save was no longer performed.

Ohter

Warning The following problem was solved by 8bbc296c2ff1fac0aefe8ac8031d16ce7f4e66d4.

I tried to debug with the latest commit(5ad70a9ea64aabf6e497cf66aa4e19a3a9a10b78), but I got the following error and could not check the operation. The same error occurs without this change.

Activating extension 'foxundermoon.shell-format' failed: ENOENT: no such file or directory, open '/home/yuto/project/vs-shell-format/dist/one_ini_bg.wasm'.

I made this change to tag 7.2.5 (557f0acb661eee4cc6c53e74c7c67a67b963e5f3) and it worked.

yutotnh commented 1 year ago

In my environment, since commit 2885fbc and its merge commit (f0b43e0f) , shell-format has stopped working.

I get the following error message.

image

I made the following changes to 32e6f3c and did yarn install and now shell-format works.

diff --git a/package.json b/package.json
index 9ebc66c..7f70f38 100644
--- a/package.json
+++ b/package.json
@@ -209,7 +209,7 @@
   },
   "dependencies": {
     "diff": "~5.1.0",
-    "editorconfig": "^2.0.0"
+    "editorconfig": "^0.15.3"
   },
   "licenses": [
     {

Sorry if this is a problem specific to my environment.

yutotnh commented 2 months ago

In my environment, since commit https://github.com/foxundermoon/vs-shell-format/commit/2885fbc8f93189a3157ac6ce5ea1f1d3d0875ba1 and its merge commit (https://github.com/foxundermoon/vs-shell-format/commit/f0b43e0f02eb54f2b63383af4783f3571add1b87) , shell-format has stopped working.

I get the following error message.

The above problem has been resolved by 8bbc296c2ff1fac0aefe8ac8031d16ce7f4e66d4. Therefore, it works fine.