zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.97k stars 2.7k forks source link

Restarts should be non-destructive on workspace restore/reload #7371

Open porsager opened 7 months ago

porsager commented 7 months ago

Check for existing issues

Describe the feature

I think especially since we're on a mac, restarts ought to be non destructive. If I restart the app, everything ought to be in the same state once it opens. I think it is worth tracking this as a separate issue, as there exists many issues that cover parts of this, but it might be possible to fix them all in one fell swoop.

These are some of the features with existing issues that this covers.

d1y commented 7 months ago

It is necessary to retain the state of the terminal

porsager commented 7 months ago

More than the point Remember terminal tabs including their cwd?

coratgerl commented 7 months ago

Also necessary to retain the local config and not reset the file on each restart

jonathanpwang commented 6 months ago

Is there an issue tracking the fact that if I have multiple workspaces/windows open, when I update Zed and restart it will only re-open one of the workspaces? I often have multiple workspaces, so it's a bit annoying to update Zed knowing I have to manually re-open my projects.

Moshyfawn commented 6 months ago

Is there an issue tracking the fact that if I have multiple workspaces/windows open, when I update Zed and restart it will only re-open one of the workspaces? I often have multiple workspaces, so it's a bit annoying to update Zed knowing I have to manually re-open my projects.

There was #5897, which was closed for another issue in the now archived feedback repository. It may have been lost in the repo migration. Perhaps reopening #5897 would make sense? @JosephTLyons

JosephTLyons commented 6 months ago

Just to quickly explain what happened with the urls. The community repo used to be called feedback. At some point, we renamed to community and then later on, we migrated all the issues from community to zed once we went open source. If you see any urls pointing to feedback, they can be resurrected by updating them to point to community, and then GitHub will forward you to the migrated issue in zed.

which redirects to:

That being said, it looks like I closed that issue too - but I'm fine with reopening that if you want to.

jonathanpwang commented 6 months ago

It would be great to reopen the other issue to track workspace serialization if that's still being worked on!

mikayla-maki commented 5 months ago

I believe several of these are already implemented, particularly:

I've checked them off and added a few other items that I'd like to get to :)

hos commented 3 months ago

I would vote for persistent terminal state too actually. If you run different processes in the terminal you will need to start them all again. For example you run a server application, ngrok and you have opened database client like psql. After restart you will need to run all this commands again. This makes the decision of restarting the editor computationally expensive for you brain. In vscode, you don't lose anything when you restart your editor. This forces me to use terminal outside of the zed editor or use tmux inside zed's terminal, although the terminal itself is really a good in my opinion.

The other think I noticed, is that when I restart it from command palette using command workspace: restart, it restart all opened projects. I failed to find the definition of the workspace in zed's docs, but either way I think it's confusing. If it must restart only the current project, it actually closing all opened projects but launching only the one from where you executed the command. If it must restart all the opened projects, then why it's not opening other projects that were open before restart?

That being said, the smoothness of the editor, to me is exceptional, I'm very thankful to all of the contributors.

thataboy commented 1 month ago

I don't know if this falls under this issue's purview, but I would like zed to reopen any opened files whether they are part of a project or not. I often have random files opened along with my project files; zed should not decide on its own that since those files aren't part of the project, I don't need them on restart.