Open abhbh opened 3 days ago
thanks for raising this!
i believe this is caused by the same underlying issue as #443; we "compile" the theme to a json file before applying it, and that currently does not take profiles and workspaces into account. i'll close this issue as it should be fixed at the same time as 443.
Duplicate of #443
i'll close this issue as it should be fixed at the same time as 443
👍
@sgoudham and i have done some more research into this issue, and for now it looks like there's unfortunately not much we can do to support this. vscode does not have a profiles API so we are unable to get the current profile in a supported way. this means that our customisation system is unable to work per-profile.
the officially supported method for this situation is to ship static themes that cannot be customised. this is not currently an acceptable solution for us - we have far too many customisation options (and people using them) to simply remove them in favour of static theme files.
we will continue to look into this to see if there's some workaround we can provide, but at the moment it unfortunately does not look good.
The issue is that Catppuccin configuration is currently saved per profile but it doesn't read it when selected profile changes. If the extension's customization system cannot support profiles, the configuration should be saved at application scope. This will at least remove the undefined behavior that the user currently sees.
The issue is that Catppuccin configuration is currently saved per profile but it doesn't read it when selected profile changes
I don't believe your statement "Catppuccin configuration is currently saved per profile" is true. We directly write to a themes/
directory on disk with no extra name-spacing for profiles. The theme is regenerated when the settings are updated, hence why the window needs to be reloaded.
I haven't looked into it yet but I don't believe there's an API / event for detecting when the user has switched profiles.
Catppuccin configuration is currently saved per profile
By this I mean the contributes.configuration
object: https://github.com/catppuccin/vscode/blob/bbb0b5a231a082790398613266e56268ae2e4de0/packages/catppuccin-vsc/package.json#L55 is written per profile. Not what the extension writes to disk.
Sure. It still remains that we cannot support per profile customisation because the theme is regenerated every time the workspace settings are changed, without any name-spacing for profiles.
There are multiple ways you can try to solve this, if supported by VSCode:
onDidChangeProfile()
event or equivalent when the user switches profile so that we can regenerate the theme. - I couldn't find anything like this while scrolling the API documentation.I hit the same roadblock when searching the Extension API documentation. So I understand your decision.
If supporting profiles is not possible or not in the roadmap, at least the inconsistency between settings.json
of different profiles should be fixed by setting scope: application
for all the contributed configurations in the manifest. It will sync state of Catppuccin extension configuration in VSCode between all user profiles.
I didn't realise that you could enforce that, good to know! Looks like the documentation is inside the contribution points, as you mentioned. Leaving the screenshot below for easy reference:
If Catppuccin options are configured in separate VSCode profiles, the last edited options in any of the
settings.json
take effect in all VS Code profiles.Steps to reproduce:
Expected Result
scope
set toapplication
(these configurations show up in Settings withApplies to all profiles
subtitle irrespective of profile used)