You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request - Project-level extensions and snippets #8102
We have a custom set of snippets written per-project and would like to include them in the project repo, like our launch.json, tasks.json. Right now we just include the json file and the dev has to copy+paste it into his user snippets, but the snippets are particular to a project, not to all projects.
Also it would be great to have a way to define what extensions a developer should have installed to work on the project. We use several code quality and styling plugins to enforce our custom rules and it would be nice if there was a project definition file to suggest installation of the extensions we define.
Reacted by Emiliano Parizzi, Valerii Vasin, Peng Lyu, Róbson Rosa, Elarcis, Alexandre Beaulieu, Daniel Turan, Charlotte R, Vladimir Kutepov, James Holcomb and 139 more
Reacted by Mattias Petter Johansson, Chaz Gatian, Sergey Litvinov, Dawn Wright, Henry Nguyen, Guhel, Manoj Baishya, Niklas Higi, Lachlan Heywood, Samuel Batista and 2 more
Reacted by Mattias Petter Johansson, Michaël Fortin, Kumar Harsh, Chaz Gatian, Daniel Rodríguez Rivero, Konstantin, Sergey Litvinov, Dawn Wright, Henry Nguyen, Philipp Munin and 14 more
A workspace config for extensions is something we are definitely thinking about.
Reacted by Chris Dias, Elarcis, Alexandre Beaulieu, Daniel Turan, Marcus Kovács, Mariusz Kujawski, Soheil Rashidi, Charlotte R, Osmar Petry, Konstantin and 25 more
I was writing test cases for extensions and those cases share similar format then I thought I should put a snippet in project settings. But unfortunately I found that's not possible right now.
This can be a good extension as well if we expose Snippet management through API.
Reacted by Róbson Rosa, Konstantin Tarkus, James Holcomb, Alexandre Beaulieu, Karstenan, Marcus Kovács, Luka Zakrajšek, Brad Christie, John Klann, Konstantin and 21 more
This would indeed be amazing. In fact, I found it really unintuitive that there is marketplace-level snippets, but not project level. Took me quite a while to figure out that it wasn't possible. :P
Reacted by Alexandre Beaulieu, Vincent Ding, Tiago Moraes, René-Pier Deshaies-Gélinas, John Weisz, Konstantin Tarkus, fallenleavesguy, rpdeshaies and iczero
Does this plugin still work? Unless I'm doing something wrong, it doesn't seem to be doing anything and there is zero information on it (in the README). I created a snippets folder in .vscode and then created a language specified snippets file within there but that file isn't loaded. I can't use the snippets there.
David Ferguson (@jdfwarrior) do you mind sharing me part of your snippet then I can have a good reproduce and see what's blocking you :( I know it's not a reasonable request but look forward to your reply.
🚀 love this feature, my extension can retire now and I don't need to fix all those issues 😆 . I'll put my name on the test item to ensure they get tested.
Activity
dbaeumer commentedon Jun 25, 2016
Martin Aeschlimann (@aeschli) can you comment on the snippet request. Can't we define snippets on a workspace folder level.
Chris Dias (@chrisdias) Sean McBreen (@seanmcbreen) for the workspace folder extension request.
seanmcbreen commentedon Jun 29, 2016
A workspace config for extensions is something we are definitely thinking about.
rebornix commentedon Aug 8, 2016
I was writing test cases for extensions and those cases share similar format then I thought I should put a snippet in project settings. But unfortunately I found that's not possible right now.
This can be a good extension as well if we expose Snippet management through API.
maxdeviant commentedon Aug 19, 2016
I would love to see workspace-level snippets.
mpj commentedon Nov 18, 2016
This would indeed be amazing. In fact, I found it really unintuitive that there is marketplace-level snippets, but not project level. Took me quite a while to figure out that it wasn't possible. :P
rebornix commentedon Dec 17, 2016
Just for your information, with the new API we added in our latest release 1.8, project/workspace level snippets is now possible. You can use this extension https://marketplace.visualstudio.com/items?itemName=rebornix.project-snippets to share and insert snippets across projects.
jdfwarrior commentedon Mar 23, 2017
Does this plugin still work? Unless I'm doing something wrong, it doesn't seem to be doing anything and there is zero information on it (in the README). I created a snippets folder in .vscode and then created a language specified snippets file within there but that file isn't loaded. I can't use the snippets there.
rebornix commentedon Mar 23, 2017
David Ferguson (@jdfwarrior) do you mind sharing me part of your snippet then I can have a good reproduce and see what's blocking you :( I know it's not a reasonable request but look forward to your reply.
jdfwarrior commentedon Mar 23, 2017
Peng Lyu (@rebornix) This is all I currently have while testing..
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
},
"Angular Controller": {
"prefix": "controller",
"body": [
"export default class $1 {",
" constructor( $2 ) {",
" $0",
" }",
"}"
],
"description": "Create new Angular controller"
}
}
Is there any kind of configuration that needs to be done to make this work?
31 remaining items
insert snippet groups by extension, user, and workspace snippets, #8102
configure snippets offers to create workspace snippets, #8102
jrieken commentedon Sep 21, 2018
Good news: Current Insiders has a rough version of this already and with next Insiders this will be working. This is how:
.vscode-folder of your workspace (but not inside subfolders of that).code-snippetsextension are supportedOrganize snippets #2
jdforsythe commentedon Sep 21, 2018
Thank you! This is why we love VS Code
ffxsam commentedon Sep 21, 2018
Thanks, team!
Ash258 commentedon Sep 21, 2018
Johannes Rieken (@jrieken) Love this, but can we expect support for subfolders? (best way
.vscode\snippets\*.code-snipets).jrieken commentedon Sep 24, 2018
Jakub Čábera (@Ash258) We are always a little scared of subfolders because there might be many, many...
rebornix commentedon Sep 24, 2018
🚀 love this feature, my extension can retire now and I don't need to fix all those issues 😆 . I'll put my name on the test item to ensure they get tested.
rebornix commentedon Sep 26, 2018
Went through https://github.com/rebornix/vscode-project-snippet/issues and test cases of vscode-project-snippet, didn't find any issue at all, the builtin support is solid 👍