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
48.52k stars 2.9k forks source link

Settings to control max tabs open #4784

Open etkachev opened 1 year ago

etkachev commented 1 year ago

Check for existing issues

Describe the feature

It would be nice to have a setting in zed that allows to configure the max amount tabs that can be open.

Like in IntelliJ products, I typically set my max to 1 so my IDE can only have one tab open at a time that I'm working on. I then use the shortcut for opening recent files to navigate where else I need to if I'm working through multiple files.

Let me know what you guys think. I still have to check if there is already an open issue to allow a shortcut to open recent files.

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

No response

mikejohnstn commented 1 year ago

I also prefer to work without tabs auto-opening all over the place. A max number would be good, and/or a way to just hide tabs altogether (max of 0 perhaps).

BuonOmo commented 7 months ago

I wanted it really badly, so here's the diff if you want to build your own zed with this integrated: https://github.com/BuonOmo/zed/compare/main...BuonOmo:zed:zentab

I think the footprint is sufficiently light that it could be considered. But I'm doubting that this setting has enough traction...

Some keywords for better finding the issue: zentab (atom ext), tab wrangler (chrome ext), tab limit

remorses commented 2 months ago

This should help with the lsp performance right? In VSCode for example the typescript language server checks the types for all open tabs and setting a low tab limit helps keeping the language server memory usage down

remorses commented 2 months ago

@BuonOmo why not open a PR? This setting is very important in my opinion

BuonOmo commented 2 months ago

@remorses I could, I'm just not sure there is enough traction for it to be accepted. TBH it is not the only place in this codebase I'd like to contribute whilst not knowing if it is desired by the core team...

remorses commented 2 months ago

I opened a PR with your diff after resolving the conflicts: https://github.com/zed-industries/zed/pull/15926

Let's see if the team agrees on the change

BuonOmo commented 2 months ago

I was waiting for an approval here before making more fuss. But let's see if your way is ok for them! Idk if you cherry-picked the commit, but normally you can ensure the name and information of original committer with git. I'd do it for proper ownership (or make it a pair commit if you intend to squash with your changes)

remainstheday commented 1 week ago

@remorses and @BuonOmo are there any updates on this? I'd love to help push it across the finish line so we can use this setting asap.

BuonOmo commented 1 week ago

@remainstheday I think the main issue is not the code. I could open a new PR by tomorrow. The issue is the visibility of this, it is unfortunately not a top ranking issue... Maybe if my new PR is clean enough they'll like it even though. Let's say I make it and you review it before them to be sure we're doing good work ? We could even pair up at some point, available today afternoon and tomorrow working hours GMT+1