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

Support VS Code settings in devfile #23330

Open
phaumer opened this issue Feb 4, 2025 · 1 comment
Open

Support VS Code settings in devfile #23330

phaumer opened this issue Feb 4, 2025 · 1 comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/enhancement A feature request - must adhere to the feature request template.

Comments

@phaumer
Copy link

phaumer commented Feb 4, 2025

Is your enhancement related to a problem? Please describe

When you start a workspace from the dashboard you provide a url to a git repository with a devfile.
When the workspace is created Che actually creates a multi-root workspace in which the repo specified in the dashboard is only one member.
As a result of being inside a multi-root workspace many of the settings provided in the repository's .vscode/settings.json are now ignored, because they need to be now specified in the .code-workspace file.
An example is the files.associations setting that is now being ignore making the workspace immediately unusable, when users depend on the custom file extensions, until they have manually copy-pasted the settings into the .code-workspace file. This makes standardization of tools and settings for a specific project difficult as users have to manually finish the setup.

Describe the solution you'd like

As the team really specifies a devfile when creating a repository that they want to load into workspaces, it would really make sense imho to allow specifying VS Code user settings as well as perhaps even the list of VS Code extensions to load inside the devfile. This could be similar to what you can do today in devcontainer.json files supported by VS Code Remote.

Describe alternatives you've considered

I know that you can achieve something similar with various config maps, but config maps are in the domain of the cluster admin and not the development team's domain, which is reponsible for the devfile, which is also repo specific. Doing things relevant for configuring a workspace with a specification that users of the same repo can share, should imho be done as much as possible in the devfile and not config maps as they are either personal only or require admin privileges for providing them to multiple users.

Additional context

See Slack discussion https://ecd-tools.slack.com/archives/C05SD64M85R/p1736302909277859

@phaumer phaumer added the kind/enhancement A feature request - must adhere to the feature request template. label Feb 4, 2025
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 4, 2025
@vitaliy-guliy
Copy link
Contributor

There is a workaround, if the repository root contains .code-workspace workspace file, this file will be used to define the workspace.
Try to create a workspace using this sample https://github.com/vitaliy-guliy/openshift_test/tree/with-code-workspace-file

@dkwon17 dkwon17 added area/editor/vscode Issues related to the Code OSS editor of Che and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

4 participants