-
Before we can fully commit to implementing the Wasm plugin system, I believe it is necessary that we first engage in discussion around what we want out of it, and how we believe it can best be implemented. Discussion here should eventually lead to an RFC, and then to resuming work on the Wasm plugins PR (#455). Discussion of alternate runtimes (e.g. Wasmer) is out-of-scope and can be discussed at a later date. Introduction to Wasm: https://developer.mozilla.org/en-US/docs/WebAssembly/Concepts |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 38 replies
-
Maybe plugins could live in separate plugin host processes. This will allow them to compute pretty heavy things without making main editor UI process slow to respond to user's interaction. |
Beta Was this translation helpful? Give feedback.
-
Is there any reason that we would want to expose an API for I'll try to spend some more time digging into how the bindings work to wrap my head around it. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this has been discussed somewhere else and I apologize if it has already been discussed but I think it would be nice if plugins came with a config file, that helix could read and understand what commands, keybindings, views, plugin settings, when to activate a plugin (onLanguage, onCommand, onDebug, workspaceContains, onFileSystem, onView, onUri,onStartupFinished), and other plugin information. Vscode requires extension declare this in their Below are some examples of json settings and how vscode renders them (all examples are taken from vsocde's api reference site ). {
"contributes": {
"commands": [
{
"command": "extension.sayHello",
"title": "Hello World",
"category": "Hello",
}
]
}
} turns into {
"contributes": {
"configuration": {
"title": "TypeScript",
"properties": {
"typescript.useCodeSnippetsOnMethodSuggest": {
"type": "boolean",
"default": false,
"description": "Complete functions with their parameter signature."
},
"typescript.tsdk": {
"type": ["string", "null"],
"default": null,
"description": "Specifies the folder path containing the tsserver and lib*.d.ts files to use."
}
}
}
}
} turns into {
"gitMagic.blame.heatmap.location": {
"type": "string",
"default": "right",
"enum": ["left", "right"],
"enumDescriptions": [
"Adds a heatmap indicator on the left edge of the gutter blame annotations",
"Adds a heatmap indicator on the right edge of the gutter blame annotations"
]
}
} turns into {
"contributes": {
"keybindings": [
{
"command": "extension.sayHello",
"key": "ctrl+f1",
"mac": "cmd+f1",
"when": "editorTextFocus"
}
]
}
} turns into (notice the Ctrl+F1 in top right corner of prompt) |
Beta Was this translation helpful? Give feedback.
-
For the past week, I've been trying to find the best way to architect the runtime, and I've started to feel that we could take a lot of inspiration from Bevy's ECS and how it's architected. More specifically, I feel that their |
Beta Was this translation helpful? Give feedback.
-
Just re-posting a big-picture question of mine from another github issue: Is it going to be at all possible to somehow use or adapt extensions from other editors (either from neovim or emacs or vscode), on any of the approaches that are being discussed? I haven't really seen any mention of this point before, but I think there's something to be said about seeing if there's any way to capitalize on all the incredible work people have already put into plugins for other editors and ecosystems, if possible. (This is the path OniVim2 took --- native vim but with the capability to use vscode extensions.) I don't think this is a decisive consideration, but it does seem worth considering. |
Beta Was this translation helpful? Give feedback.
-
@CBenoit and I talked a couple of days ago, and I think that we can probably (emphasis) move forward with writing an RFC and getting it implemented. I only speak for myself though. |
Beta Was this translation helpful? Give feedback.
-
How would a plugin system built around WASM would work from the perspective of a user of helix who wants to install and use plugins? WASM is a binary format so my understanding is that each plugin would need to be compiled before it could be used. Because of this it wouldn't be possible to simply add a list of git repo URLs to a configuration file to install plugins in the same manner as for example packer.nvim. Would plugin authors compile their plugins so that consumers don't have to? If so where would the compiled binaries be stored / would a central plugin repository (sort of like npmjs.org) need to be created? |
Beta Was this translation helpful? Give feedback.
-
Is this still happening? I don't know Rust, but know WebAssembly pretty well (I wrote an assembler for it). I could help with the design at least. |
Beta Was this translation helpful? Give feedback.
@CBenoit and I talked a couple of days ago, and I think that we can probably (emphasis) move forward with writing an RFC and getting it implemented. I only speak for myself though.