Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👀 Extension Architecture / API #76

Open
1 of 17 tasks
jasonplatts opened this issue Mar 19, 2022 · 8 comments
Open
1 of 17 tasks

👀 Extension Architecture / API #76

jasonplatts opened this issue Mar 19, 2022 · 8 comments
Labels
clarification needed Further information is requested enhancement New feature or request extensions Issues related to the extension architecture in CodeEdit help wanted Extra attention is needed PRIORITY This issue has priority over other issues.

Comments

@jasonplatts
Copy link
Collaborator

jasonplatts commented Mar 19, 2022

Overview

Support for extensions is planned for a future release of CodeEdit. The extension system will provide similar capabilities to that of other editors.

Contributing

If you wish to contribute to building the CodeEdit extension architecture, please see the tasks below and review the relevant parts of the API documentation repository. This documentation should be used as the guide for development.

PLEASE NOTE THE DOCUMENTATION IS STILL WORK IN PROGRESS. TASKS AND THEIR RELATED GITHUB ISSUES WILL BE UPDATED AS THE RELEVANT DOCUMENTATION IS COMPLETED.

Each API feature functionality first needs to be built into CodeEdit so that it can be used internally by the application and then later exposed to extensions through the API.

Tasks

References

@lukepistrol lukepistrol added the enhancement New feature or request label Mar 19, 2022
@jaydenseric
Copy link

If extensions have a JS API, it would be great if they can be standard ESM instead of CJS like Nova requires for its extensions:

https://docs.nova.app/extensions/#javascript-modules

CJS makes it tricky (but not impossible) to author extensions using Deno or other standards-aligned tooling without introducing a build step.

@jaydenseric
Copy link

Related: CodeEditApp/CodeEditTextView#40 .

@jasonplatts
Copy link
Collaborator Author

Hi @jaydenseric.

Thanks for joining the discussion. @austincondiff and I talked about this and it has been brought up in our Discord too.

Since it is early in the development, no decisions have been made in relation to the extension architecture. JavaScript Core (https://developer.apple.com/documentation/javascriptcore) has been mentioned as a possible option for implementing extensions. Unfortunately, as far as I am aware, it does not support ESM.

Having developed some extensions for Nova, I know this has been a frustration shared by other devs too. And, hopefully we can find a final solution that supports ESM. We also have an extensions channel in our Discord if you would like to get involved in the conversation.

@lukepistrol lukepistrol changed the title Add Extension API [FEAT] - Add Extension API Mar 21, 2022
@jasonplatts jasonplatts added the extensions Issues related to the extension architecture in CodeEdit label Mar 22, 2022
@jasonplatts jasonplatts changed the title [FEAT] - Add Extension API [FEAT] Extension API Mar 22, 2022
@lukepistrol lukepistrol added the clarification needed Further information is requested label Mar 29, 2022
@austincondiff austincondiff pinned this issue Mar 31, 2022
@austincondiff austincondiff changed the title [FEAT] Extension API ✨ Extension API Mar 31, 2022
@austincondiff austincondiff changed the title ✨ Extension API ✨ Extension Architecture / API Apr 4, 2022
@austincondiff austincondiff mentioned this issue Apr 5, 2022
15 tasks
@austincondiff austincondiff added help wanted Extra attention is needed PRIORITY This issue has priority over other issues. labels May 20, 2022
@austincondiff austincondiff changed the title ✨ Extension Architecture / API 👀 Extension Architecture / API Jun 24, 2022
@austincondiff austincondiff moved this from 🆕 New to 📋 Todo in CodeEdit Project Feb 16, 2023
This was referenced May 23, 2023
@chriskrycho
Copy link

Whether or not the host environment supports ESM, it should be straightforward to provide a standard bit of boilerplate to make bundling it into a version which handles module scopes etc. easy for end user developers. (I'm happy to provide some input that way if/as you get there; just ping me about it!) Related: please do what Nova has not yet done and build your JS API in TypeScript and shipping types natively. (I'm also happy to advise on that!)

@austincondiff
Copy link
Collaborator

austincondiff commented Oct 5, 2023

@chriskrycho That would definitely be ideal for a JS/TS API. We'd love to hear what you had in mind!

@TheBlckbird
Copy link

TheBlckbird commented Jan 13, 2024

What about an extension system via WebAssembly? You could use WasmKit.

@TheBlckbird
Copy link

If extensions have a JS API, it would be great if they can be standard ESM instead of CJS like Nova requires for its extensions:

https://docs.nova.app/extensions/#javascript-modules

CJS makes it tricky (but not impossible) to author extensions using Deno or other standards-aligned tooling without introducing a build step.

How do you plan to run the JS? Cuz if you were using Bun, the whole CJS/ESM thing wouldn’t be such a problem, since Bun supports both, even in the same file.

@nervenes
Copy link

I'd also recommend WASM instead, most new editors seems to take this route (Zed, Lapce, Helix etc..), and for a reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification needed Further information is requested enhancement New feature or request extensions Issues related to the extension architecture in CodeEdit help wanted Extra attention is needed PRIORITY This issue has priority over other issues.
Projects
Status: 📋 Todo
Development

No branches or pull requests

7 participants