ctf0 / vscode-save-editor-layout

GNU General Public License v3.0
11 stars 2 forks source link

Bug Report: Saved settings (maybe only the saved layout list) don't play nice with profiles #11

Closed Gaibhne closed 11 months ago

Gaibhne commented 11 months ago

I attempted to make this extensions settings apply globally to all profiles, and ran into all kinds of issues. If this is something you want to put effort in, I'll take the time to make a detailed bug report of how to reproduce, what goes wrong and so on, but I am fine with copying the list manually when I update it, so I have no stake in this bug and if you want to leave it as wontfix, I wouldn't want to bother setting up a whole thing to debug it.

ctf0 commented 11 months ago

unfortunately i don't use profiles and so i dont know how to save the settings globally other than what we already have, however if u found the api documentations that tackle this part, i would happily update the extension with it.

Gaibhne commented 11 months ago

I know nothing at all about VSCode development, so I couldn't tell you anything about the API. It is my understanding that VSCode itself is in charge of making a setting global (see https://code.visualstudio.com/docs/editor/profiles#_applying-a-setting-to-all-profiles); I think clicking that option (which exists for your settings too, so I think support is implicit) moves the setting in question from the user/workspace/profile settings file to the 'Default profiles' settings file, which results in any profile changing the setting to automatically apply to other profiles (I think it works like an object reference in programming) and I believe the changes were introduced in https://github.com/microsoft/vscode/pull/187750.

Without knowing how your code works, I would guess that your own 'make layouts global' setting probably interferes somehow, but that's the best I've got.

ctf0 commented 11 months ago

from the docs https://code.visualstudio.com/api/references/vscode-api#ConfigurationTarget, there is nothing related to profiles

ctf0 commented 11 months ago

also what u need is this https://github.com/microsoft/vscode/issues/176813#issuecomment-1497892741 workbench.settings.applyToAllProfiles