microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.08k stars 28.27k forks source link

In-project custom extension in `.vscode/` #221406

Closed merrywhether closed 2 weeks ago

merrywhether commented 2 weeks ago

For large projects, it can make sense to have very customized VSCode extensions that are tightly coupled to specific patterns and policies within the codebase and aren't meaningfully generalizable. Currently there isn't a great solution for these use-cases:

Ideally a project could define its own extension(s) in the .vscode/ directory and have that extension be automatically loaded and activated when working within its workspace. This would enable a much more streamlined project+extension integration and effortless propagation of updates to users. There are some edge-cases that would have to be considered, like how to trigger reloads of extension during forward development or branch switching and whether users can opt out of the extension.

This could also have the side-effect of making some initial extension development easier in general, as work could be started directly against the codebase that inspired the idea before being split out into its own standalone project.

gjsjohnmurray commented 2 weeks ago

The Workspace Extensions feature arrived in April 2024

See #206783

merrywhether commented 2 weeks ago

Oh awesome. I didn't see it in the docs, but I'm hyped that it's already available. Thanks!