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
50.15k stars 3.08k forks source link

Command palette/projects/text buffer extension API #18043

Open nd0ut opened 1 month ago

nd0ut commented 1 month ago

Check for existing issues

Describe the feature

Hi! I noticed that Zed has introduced an extension API, and I was planning to write an equivalent of the Project Manager (https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager) for VS Code. However, to my surprise, I found that the API does not allow adding custom commands to the command palette or managing the built-in projects.

I also thought about creating an equivalent of change-case (https://marketplace.visualstudio.com/items?itemName=wmaurer.change-case), but again ran into the lack of command palette API and the inability to control the text buffer.

Could you let me know if you plan to implement something like this, and is it included in the "General purpose extensions" section of the roadmap?

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

No response

elvishp2006 commented 1 month ago

Zed already have a native change case, do you want to extend this functionality in any way?

Captura de Tela 2024-09-18 às 18 25 17
nd0ut commented 1 month ago

Zed already have a native change case, do you want to extend this functionality in any way?

Oh, cool 🔥 I'm sorry, I missed this.

Regarding the project manager, personally, I really miss the automatic scanning for git repositories - that's the reason why I wanted to write an extension for this.

eliasrenman commented 1 month ago

I'd like to add on to this that what i'm missing to make my Zed editor complete are the commands given with the two extensions in VS Code: advanced-new-file and file-utils

These extensions combined give me the possibility with keyboard only (and the command palette)

I think being able to create extensions with a command palette api would solve all of the functionality above.

jacobwhall commented 2 weeks ago

I would like to add commands to the command palette to manage dependencies in my coding projects and trigger build processes, as described here #7808.

The closest we have right now are "slash commands", an API for extensions to register commands to be used within the AI assistant panel. I played with these a bit in this project. I imagine command palette actions could have a very similar API.

Additionally, it is difficult for extensions to run external processes unless it's a language server, or something pretending to be a language server. If extensions are already allowed to download and run binaries for that purpose, surely we could allow this functionality to be used more easily in other contexts.