[Proposal] Scratchpad with lang support #16751
-
ProblemSometimes during the process of coding we need a scratchpad space to store / work on something. Whether it's just plain text (abstract), or an actual source code file. SolutionAdd scratchpads to Zed. When creating a scratchpad, one can select the language the scratchpad is for (none, or an actual language) and get syntax highlighting support for it. DesignScratchpads will:
Additionally, in the future, this scratchpad feature could serve as the base for a local "Rust playground" of sorts, perhaps having the same syntax as the cargo script rfc (this allows easy internal migration over to cargo's native feature). With a toolbar. This would allow us to use a local version of playground straight from our IDE! No relying on websites anymore, and it supports the same host. What are your thoughts on this? I am thinking of maybe spearheading such a thing if it's desired, though as I'm a new contributor I may need some guidance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm very much in favor of this proposal as I use this feature quite often in Intellij and would love a similar functionality in zed as well. In contrast to the implementation in Intellij I think it could be worth it to think about decoupling the scratches from the projects they are created in. Maybe it's just my way of using it but I mostly use this feature to prototype or test general concepts that are often not quite related to a specific project. Therefore I would like to have a more sophisticated approach where you could categorize scratches (maybe with some kind of tagging system) to easily find them again. |
Beta Was this translation helpful? Give feedback.
-
Totally support this idea |
Beta Was this translation helpful? Give feedback.
-
I think you can do this already by making a new file ( |
Beta Was this translation helpful? Give feedback.
I think you can do this already by making a new file (
cmd-n
on macOS) and then selecting a language for that file (cmd-k m
on macOS). These temporary files will be restored, including the language setting, whenever Zed restarts!