zed icon indicating copy to clipboard operation
zed copied to clipboard

Selected theme not being saved for follow up ZED execution/re-launch

Open krstp opened this issue 2 years ago • 4 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Latest release with other bug fixed does not preserve last selected theme returning back to default setup.

Environment

Zed: v0.88.6 (stable) OS: macOS 13.4.0 Memory: 32 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

  • Launch ZED
  • Select custom/diff theme
  • Quit ZED
  • Relaunch ZED
  • Theme will return to default not to the selected theme

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

krstp avatar Jun 02 '23 17:06 krstp

Hmm, I'm not able to reproduce this myself. Wonder what the differences is.

JosephTLyons avatar Jun 05 '23 04:06 JosephTLyons

I forgot I submitted this issue 😅

In the past days, dwelling more into it, the thing is:

  • I made a mistake providing a trailing comma (which solves and points to the main error)
  • HOWEVER, when trailing comma is provided, ZED accepts it in the settings, but will not show any "error" feedback out of the resultant trailing comma.
  • Then, when relaunching ZED, the config file will be misread (or rather not read due to trailing comma) resulting in default theme load.

In short 🙄 (wash-rinse-repeat):

  • Trailing comma results at new launch in default profile load.
  • However, when during the active session the config is changed, ZED would not default to default, but would prevail in the current config (not defaulting on theme) without reporting any trailing comma error; at the same time would also not accept changed config, such as it would just linger at latest (currently loaded) working config.

Proposed solution:

  • would be nice to get some error feedback.
  • I do not mind ZED staying at the latest working config, however, when ZED relaunches it should yield the same last-working config.
  • Needless to say, repeating what I write in the first bullet point, either at launch or during misspelled config edit, there should be some kind of syntax verification/check with feedback to user of config JSON formatting error.

One could say this issue could be somewhat related to zed-industries/zed#6074 where similar concern is raised.

krstp avatar Jun 07 '23 04:06 krstp

@krstp thank you! was having this issue and the trailing comma was the fix for me, too.

thinkontheclock avatar Oct 30 '23 13:10 thinkontheclock

I have similar issue:

  1. I switch theme
  2. It works for a couple of seconds, then it reverts back to the old theme
  3. Inspecting the settings.json files shows the new theme, but it is not being respected by the application.

oliverjohns avatar May 15 '24 06:05 oliverjohns

facing same issue

KMJ-007 avatar Jun 06 '24 05:06 KMJ-007

after debugging little

it is changing the workspace theme but not the default theme

KMJ-007 avatar Jun 06 '24 05:06 KMJ-007

I believe this is caused by:

  • https://github.com/zed-industries/zed/issues/12389

If you have an error in your settings.json we don't immediately revert to the default settings, we leave your last working settings in place. When Zed is reopened we revert to default because don't keep a cached copy of the last good. Closing here in favor of that issue. Please 👍 and subscribe to track that issue.

notpeter avatar Jul 03 '24 14:07 notpeter