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

[Feature request] Support templates for workspaces #90649

Closed
gusbemacbe opened this issue Feb 14, 2020 · 22 comments
Closed

[Feature request] Support templates for workspaces #90649

gusbemacbe opened this issue Feb 14, 2020 · 22 comments
Assignees
Labels
feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues

Comments

@gusbemacbe
Copy link

gusbemacbe commented Feb 14, 2020

Hello,

We all know the command --disable-extensions which disables all the extensions when opening VSCode via terminal.

  1. Yes, we also know the option --extensions-dir, but if we have to do it with this option, we have to create multiple folders prefixed with .vscode-* and symlink some extensions.
  2. And for the command --disable-extension – it allows disabling only one extension and not more than extensions.

The ideal is that, we would like to open VSCode only with few extensions and excluding/disabling all other to optimise the performance due to the #89300, which showed that, with many extensions, searching and replacing all files at once will slow down the performance of VSCode and of the PC.

So we would add the new command --enable-extensions <id> <id> <id> ....

@gusbemacbe
Copy link
Author

Hello @bpasero, @JacksonKearl, @roblourens @sandy081 and @Tyriar !

I have read another topic about the workspaces with few extensions (#15611). According to you, the enabled extensions in each workspace are locally stored in the cache folder Code - Insiders/User/workspaceStorage/, the problem is that we want to back up the workspaces and the settings and it is useless to copy the whole workspaceStorage folder full of many unnecessary previous caches and states. For example, lets us call two computers A and B:

  • I will copy the .code-worskapce files from the computer A to the computer B;
  • In the computer B, I will open .code-workspace with VSCode, but you see that all extensions are enabled, because the workspaceStorages and caches are available only on the computer A.
  • So, in the computer B, I have to redo what I did in the computer A. It is a waste of time. Too much repetitive.

It is why you should add --enable-extensions or let us config only the extensions we can enable in the .code-workspace file.

@sandy081
Copy link
Member

May I know why you would like to backup user data (settings etc)? Is it for syncing across machines?

Is your request similar to this - #40239 ?

@sandy081 sandy081 added the info-needed Issue requires more information from poster label Feb 20, 2020
@gusbemacbe
Copy link
Author

gusbemacbe commented Feb 20, 2020

May I know why you would like to backup user data (settings etc)? Is it for syncing across machines?

Yes, it is. I use @shanalikhan's Settings Sync. It backs up the workspace folder, but does not back up the workSpaces folder.

Is your request similar to this - #40239 ?

Reading this topic...:

  • In @michaeljota's and @ramya-rao-a's case, he and she want to disable some extensions. In my case, I want to enable some and disable all other. Their case is team-specific;
  • In @JordyScript's case, it is project-specific instead of workspace-specific. Not global. I want to set the specific workspace for every project, for example: A workspace called "PHP Projects" with PHP-specific extensions for any PHP project;
  • Regarding @Sti2nd's summary, it is mostly team-specific and project-specific, I am the only user that wants to sync across multiple machines of mine, need to apply it to a specific workspace for any project made in a specific language;
  • Regarding @aaronpowell's extension VSCode Profile Switcher, what I said and what @TheryFouchter said, we have to create multiple folders and multiple symlinks, but multiple user-data increases the file size. Only the new command --enable-extensions and .code-workspace with enabled extensions and all disabled extensions will save the file size. Note that @shanalikhan's Settings Sync does not back up the profiles generated by @aaronpowell's extension VSCode Profile Switcher.

I do not want to use recommendations because they will not install or not enable automatically them.

@gusbemacbe
Copy link
Author

Hi @sandy081!

What is your decision?

@sandy081
Copy link
Member

FYI we are currently working on providing sync OOB and since your requirement is to sync workspaces, I would tag this as a sync request.

@sandy081 sandy081 changed the title [Feature request] Open VSCode only with few extensions and excluding all other [Feature request] Sync workspaces Feb 23, 2020
@sandy081 sandy081 added feature-request Request for new features or functionality settings-sync and removed info-needed Issue requires more information from poster labels Feb 23, 2020
@sandy081 sandy081 added this to the Backlog Candidates milestone Feb 23, 2020
@vscodebot
Copy link

vscodebot bot commented Feb 23, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@sandy081 sandy081 modified the milestones: Backlog Candidates, Backlog Feb 23, 2020
@gusbemacbe
Copy link
Author

Hello @sandy081 !

There is a small problem.

I do not want to add folders to the workspaces because each workspace is for any project.

@sandy081
Copy link
Member

sandy081 commented Mar 2, 2020

Not sure if I understand what you meant. Can you please elaborate?

@gusbemacbe
Copy link
Author

Not sure if I understand what you meant. Can you please elaborate?

The folders are always saved in the workspace. When I open the workspace, the projects are there. I do not want to add or save them, I want an empty workspace, because the workspace is for any project, not just for added or saved project.

@sandy081
Copy link
Member

sandy081 commented Mar 2, 2020

Then what does the workspace configuration file shall contain?

@gusbemacbe
Copy link
Author

Then what does the workspace configuration file shall contain?

{
	"folders": [
		{
			"path": "/home/gusbemacbe/Templates/Alan Silva"
		}
	],
	"settings": {
		"liveServer.settings.multiRootWorkspaceName": "Formulário com Validação"
	}
}

Look at folders. I do not want the workspaces to keep or save these folders for the next times.

@sandy081
Copy link
Member

sandy081 commented Mar 3, 2020

It means you only want settings to be synced? If so how different this is to have this setting in user settings and get synced?

@gusbemacbe
Copy link
Author

It means you only want settings to be synced? If so how different this is to have this setting in user settings and get synced?

Yes, with JSON of enabled extensions, similar to Sync Settings. Only it will not download the extensions. It will check if which extensions should be enabled and not enabled when I open the workspace.

If you have difficulty to understand my explanation due to language barrier, maybe @shanalikhan will explain better or I will explain with JSON.

@sandy081
Copy link
Member

sandy081 commented Mar 3, 2020

Yeah it is difficult to understand your requirement. Can you please explain your use case with an example?

@gusbemacbe
Copy link
Author

Yeah it is difficult to understand your requirement. Can you please explain your use case with an example?

@sandy081

Here is how should .code-worksapce:

{
  "settings": 
  {
    "extensions": 
    {
      "dart-code.dart-code": "disabled",
      "dbaeumer.jshint": "disabled",
      "dustinsanders.an-old-hope-theme-vscode": "enabled",
      "ms-vscode.atom-keybindings": "enabled",
      "pranaygp.vscode-css-peek": "disabled"
    },
    "folders": 
    {
      "addFolderToWorkspace": false,
      // or
      "saveFolderToWorkspace": false,
      "path": ""
    }
  }
}

@sandy081
Copy link
Member

sandy081 commented Mar 6, 2020

Sorry still unclear to me. Please explain me the end to end scenario.

@sandy081 sandy081 added info-needed Issue requires more information from poster and removed feature-request Request for new features or functionality labels Mar 6, 2020
@sandy081 sandy081 removed this from the Backlog milestone Mar 6, 2020
@gusbemacbe
Copy link
Author

gusbemacbe commented Mar 13, 2020

Hello @sandy081

I simplified a bit, removing settings. I will explain each part. The whole code:

{
	"folders": 
	[
		{
			"path": "",
			"saveFolderToWorkspace": false,
		}
	],
	"extensions":
	[
		{
	           "dart-code.dart-code": "disabled",
	           "dbaeumer.jshint": "disabled",
	           "dustinsanders.an-old-hope-theme-vscode": "enabled",
	           "ms-vscode.atom-keybindings": "enabled",
	           "pranaygp.vscode-css-peek": "disabled
		}
	]
}
  1. In this part, if I set false to saveFolderToWorkspace, the added folder will never saved to workspace when I close the workspace or VSCode and when I open the workspace or VSCode next time:
"folders": 
[
	{
		"path": "",
		"saveFolderToWorkspace": false,
	}
]

This is important for the user who opens different PHP projects with a same PHP-specific workspace without getting bothered with a formerly saved/added folder/project, so he does not have to remove that project from workspace. Opening is different of adding. Adding bothers more the user because it always saves the folder or projects to the workspace.

If I set true, the added folder will be always be saved to the workspace when you close or open the workspace or VSCode, like:

"folders": 
[
	{
		"path": "/home/gusbetuga/Projects/PHP-Workspace",
		"saveFolderToWorkspace": false,
	}
]
  1. In another part, setting disabled or false means the extension is disabled, and setting enabled or true means the extension is enabled, so the user does not have to enable and disable manually the extensions the extensions in each workspace in a new machine:
[
	{
		"dart-code.dart-code": "disabled",
	        "dbaeumer.jshint": "disabled",
	        "dustinsanders.an-old-hope-theme-vscode": "enabled",
	        "ms-vscode.atom-keybindings": "enabled",
	        "pranaygp.vscode-css-peek": "disabled
	}
]

@sandy081
Copy link
Member

I see there are two requests.

  1. You want a workspace template.
  2. You want to persist extensions enablement for a workspace. This is a separate request which is tracked already.

This issue will be tracked for workspace template.

@sandy081 sandy081 changed the title [Feature request] Sync workspaces [Feature request] Support templates for workspaces Mar 13, 2020
@sandy081 sandy081 added feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues and removed info-needed Issue requires more information from poster settings-sync labels Mar 13, 2020
@sandy081 sandy081 added this to the Backlog Candidates milestone Mar 13, 2020
@vscodebot
Copy link

vscodebot bot commented Mar 13, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@gusbemacbe
Copy link
Author

@sandy081

I think it will not be moved to the backblog as it will not receive votes, as the vscodebot has said.

@sandy081
Copy link
Member

Yeah it is true as mentioned in the documentation.

@gusbemacbe
Copy link
Author

@sandy081,

I'm going to close the issue as it does not have less than 20 votes. I'll create several workspaces folders by language and symlimk some specific language extensions for each workspace folder.

Or I must migrate from VSCode to another lightweighting text editor with very low memory requirements.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

2 participants