-
-
Notifications
You must be signed in to change notification settings - Fork 233
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] - Add support to Profile
for Projects
#281
Comments
This is what I found in the API: https://github.com/Microsoft/vscode/blob/master/src/vs/vscode.d.ts#L8921-L8949 |
Something like this I guess. const projects = [
{
enabled: true,
name: 'Test',
rootPath: '$home/Test',
group: 'testings',
extensions: {
'ms-vscode.vscode-typescript-tslint-plugin': true,
'rebornix.ruby': false
}
}
]
projects.forEach(({ extensions }) => {
Object.keys(extensions).forEach((extName, active) => {
const ext = vscode.extensions.getExtension(extName)
if (!ext) {
// not a known extension
return
}
if (active) {
ext.activate()
} else {
// deactivate extension here
}
})
}) |
Hi @muuvmuuv , Well, this is not the extension's original idea, which is simply to give you easy access of your favorite projects, but I agree this is a great addition to the workflow. But I'm wondering, why VS Code does not support it natively (using a local file), just like it does for Extension Recommendations ( I don't know when you reach out VS Code team asking for this, but maybe it was prior this Enable/Disable extension per workspace feature being implemented (I guess it happened last year). If that is the case, I think if you ask them again, it could be natively supported using My main concern about adding this to the extension (besides not being it's original idea) is because some extensions requires reloading the workspace when you enable/disable it. I'm not sure why it does happen, and what could be done to detect, in order to avoid/warn the user. Without this issue, as you already commented, it's doable :-). Hope this helps |
Ah I see some people already asked that again in VSCode, haven't checked that before. So hopefully they will add this soon ^^ And yes it was before the Extension Recommendations, don't get it why they implemented this, never have used this because it's so uncomfortable to use. I just thought it would be a great combination with projects/workspaces in one destination. Anyway I still think this extension should be natively supported 😆 Code is on a good way to get a nice IDE but Project Management is missing and I really don't know why they don't want it. |
I can't understand how does this feature would binding to the current project? I think it would be great to add parameters for exec the [
{
"name": "google_spreadsheets_chat_bot",
"rootPath": "/raid/user/gitlab.com/blah-blah ",
"paths": [],
"group": "",
"enabled": true,
"args": "--extensions-dir /home/user/yada-yada"
}
] It would let us to use more flexible options. Using exported variables would be great too. "before runs triggers" are appreciated too. |
Hi @oshliaer , Thank you for your suggestion, but to switch between projects, the extension does not use I'm not sure such extensibility is possible, because some of the command args may define how VS Code will open, so I guess to accomplish such feature, it would indeed need to use Hope this helps |
It appears my concerns about enabling/disabling extensions were real. A new extension called Profile Switcher already has a few open issues about it: https://github.com/aaronpowell/vscode-profile-switcher/issues/ I'll keep watching its evolution, but if these errors didn't get fixed, I'll cancel the issue. Hope this helps |
Sounds reasonable for me. The extension looks good but I don't want to have this separated if it's possible 😄 |
Hi @muuvmuuv , I did take a look at Profile Switcher extension to see it evolution and just noted that it does not really _ disable/enable_ extensions but uninstall/install instead. That's not something that I would like to do, because installation is not a workspace feature. For now, there is no API to I'll keep looking |
Depends on microsoft/vscode#84997 |
Just recently (microsoft/vscode#84997 (comment)) the dependency issue has been moved to “Backlog Candidate” by the VS Code team, which means it has 60 days to receive enough attention (upvotes), otherwise it will be closed. So, for those of you interested in this issue to be possible, go to the VS Code repo and upvote. |
There are 12 👍 now. |
Such a feature would be extremely nice to have to improve the overall performance of VSCode as well. I am working on many different projects with different languages and some extensions I don't use for specific languages simply drain performance. The profile switcher extension is a good idea. There is also an extension disabler extension but they are all not working with WSL and are unmaintained. |
Hi @DAmNRelentless , The VS Code team is working on a new feature, temporarily called Profiles, and according to its issue (microsoft/vscode#116740), it would allow enable/disable extensions per profile, via config file (microsoft/vscode#40239). It's great news 🎉 |
That's really awesome to hear! |
Maybe. It depends on how it will end up being developed by the VS Code team. If it only loads from the If they provide a Let's see 😬 |
There's also this extension that came out in April vscode-profiles. I haven't tested it yet but I'm installing it now. It is somewhat of a hack with symlinks etc, but that's what's needed when there's no API to work with. Edit: This extension looks to be more trouble than it's worth. You can't have different profiles in different windows. My impression is that it installs/uninstalls extensions when activating profiles. There are too many hacks. I wonder how it works with the settings for the web version of vscode. |
I've also used this. I literally tested all available profile and extension disabler extensions there are. None of them is really good. |
Personally, I hope that the native User Profile feature the VS Code team is planning (microsoft/vscode#116740) would work on all scenarios. At least based on the description, it seems they are aware of the per profile extension enablement. Let’s see how it goes |
@muuvmuuv after 4 years they realized that maybe they had to implement it |
leaving a comment here just to follow the debate. |
Hi @miguelsmuller , I suggest you to keep track on microsoft/vscode#116740 as well, because I hope this feature will be added natively in VS Code. Hope this helps |
Any news here? |
I’m waiting to see how the new Profiles feature will work. But it seems (based on a few tests) that VS Code remembers the previous profile you were using for an specific project. So, if you open a project and select/activate a profile, the next time you open that project, it will load that same profile. But, it is not a stable experience, yet, as it did not recovered the previous profile in some testes. Let’s see. |
Just forgot to comment here about the Feature Request that the VS Code team asked me to create - microsoft/vscode#156173. With this new API, I would be able to open a project with a pre-defined Profile. I think this is good news, and with that, this feature could be finally released. Stay tuned |
Opening a folder with a specific profile should be happening very soon now ! |
For sure 😬 |
Profile
for Projects
@alefragnani 【Add support to Profile for Projects 】 When can I publish it? |
Playing with it and it seems to be working just fine, and should be available in the next release. Then, I wonder if add the possibility to assign profiles to Tags as well would be a good improvement to the next update 😬 |
@alefragnani just checking in - is there any ETA for releasing this feature? |
yeah, really expecting this new feature! That's gonna be amazing, thx @alefragnani ! |
Some time ago I tried reach out to VS Code team to allow projects to have an extensions file (in .vscode folder) where I can say which extensions I want to have enabled or disabled, sadly it got rejected.
I work with different type of projects, some requires PHP extensions, some have only NodeJS/JavaScript, TypeScript, Go and so on. My idea was to have a file or a config section somewhere where I can say in which projects/folder I want to have extensions enabled or even disabled in some cases. This would reduce the startup time heavily in my case.
I thought about ways how this could be done and now my idea is to have my projects managed together with my extensions I want to have enabled for my projects. So the best solution is to combine them in the project manager where a new object
extensions
would allow extension to be enabled/disabled. I don't know if this is possible but I think this is something that belongs here.The text was updated successfully, but these errors were encountered: