-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Allow to define VS Code extensions preferences in Che plugin registry #17975
Comments
I think this one is a good candidate for a bump in priority -- we are seeing this use needed for multiple extensions:
|
this may be related |
maybe add lombok to the list :P |
And the "official" vale plugin: https://github.com/errata-ai/vale-vscode |
There is a hack/workaround to do that: add the preference at the sidecar entrypoint level: |
@sunix that hack will not work for multi-root workspaces which should be coming real soon. |
But we could do this: write some code in che-theia that reads preferences files from a well known location (/projects/.initprefs) and applies those preferences properly at workspace creation time. |
@tsmaeder agree that eventually that won't be valid. But we don't have multi-root yet. It works at the moment, that's why it is called a |
@sunix it's a workaround because the exact mechanism of storing workspace settings are an undocumented implementation detail of Theia. If we used that proper API, everything would just keep working. |
@tsmaeder we have use the workspace settings in a workspace file like {
"folders": [
{
"path": "file:///tmp/theiadev_projects"
},
{
"path": "file:///tmp/theiadev_projects/console-java-simple"
}
],
"settings": {
"java.semanticHighlighting.enabled": false
} keeping it in |
For devfile v2:
|
@benoitf @ericwill If it's too hard to implement that for devfile 2.0 + multiroot, I think we could apply the workaround above and patch |
I still don't like the patch solution as proper solution. AFAIK, patch is only possible today when we have sidecars (as you're updating the entrypoint.sh) So why can't we:
Then, when the sidecar is booting, if there ENV var in devfile 2, we fetch all attributes with che-theia-settings and apply these properties so the logic of 'how to provide settings' is not in the sidecar entrypoint, but on the consumer, che-theia) |
No, it's not about a proper solution but temporary solution for devfile v1 + multi root. it is a trivial change while we work on your proposal for devfile v2. I am -1 to have multiroot on by default if it breaks that. |
I'm not sure about the |
Well it'll avoid to patch all entrypoint.sh ( also the suggested hack won't work with devworkspace engine) |
@benoitf I have just checked and the hack is for only 2 plugins (ruby and asciidoc). I don't mind what we choose but if the 2 plugins don't have the settings required to work properly in multi-root, I am strongly against turning on multi-root by default. Users will be impacted. |
The agreed way forward is:
|
4 steps have been done. |
We have fixed that for devworkspace based workspaces. We are not going to fix it for che-server mode when the extension is not running on a sidecar since che server engine will be deprecated. Closing this issue. |
this feature will allow 2 things:
set default static configurations for extensions that don't implement the use of ENV_VARS from within plugin's meta.yaml and avoid having to set them in the devfile scope.
fix things that need to be set in a specific way when extension A needs to change the behavior of extension B, example:
set java engine from lombok extension's meta.yaml without the 2 extensions having to be mashed up in the same plugin (producing a duplicate of references to vsix that need to be updated separately).
as a consequence this feature will prevent:
extensions from downloading content from internet that can be previously populated in the sidecar
having to "edit" extensions code to adapt them for sidecars.
example cases of this problem:
kotlin
lombok
The text was updated successfully, but these errors were encountered: