bilelmoussaoui / flatpak-vscode

Integrate Flatpak with VSCode
MIT License
91 stars 13 forks source link

Diff to `.vscode/settings.json` #228

Open caspermeijn opened 9 months ago

caspermeijn commented 9 months ago

I commit .vscode/settings.json to git repo. Sometimes, I get a diff, where the order of settings.json is edited for mesonbuild properties. First, I thought writing to the workspace configuration when the property is not changed was the problem, but #227 didn't fix my problem.

After some debugging, I found that changing the flatpak manifest causes the VSCode window to reload. This means the meson and rust integrations are first unloaded and then loaded. This causes the workspace config to be set to undefined and later to the same value.

This leads me to two question:

SeaDve commented 9 months ago

Why is the VSCode window reloaded on every manifest save? (I have auto-save enabled, so for me this is every keystroke)

If i remember correctly, meson extension causes the window to reload as its config changes.

Why is the workspace configuration removed on unloading the integration?

I suppose it makes the configuration obsolete when the integration is unloaded, but I see it being a problem when the config is set by the user.

bilelmoussaoui commented 8 months ago

I think we should not re-write the settings every time the user changes anything in the manifest. That would require a smarter diff between the two buffers to figure out whether: