Skip to content

Feature Request - Project-level extensions and snippets #8102

Closed

Description

  • VSCode Version: all
  • OS Version: all

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.

Activity

  1. dbaeumer commented on Jun 25, 2016

    @dbaeumer
    Member

    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.

  2. seanmcbreen commented on Jun 29, 2016

    @seanmcbreen

    A workspace config for extensions is something we are definitely thinking about.

  3. rebornix commented on Aug 8, 2016

    @rebornix
    Contributor

    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.

  4. maxdeviant commented on Aug 19, 2016

    @maxdeviant

    I would love to see workspace-level snippets.

  5. added
    feature-request
    on Nov 7, 2016
  6. mpj commented on Nov 18, 2016

    @mpj

    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

  7. rebornix commented on Dec 17, 2016

    @rebornix
    Contributor

    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.

  8. jdfwarrior commented on Mar 23, 2017

    @jdfwarrior

    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.

  9. rebornix commented on Mar 23, 2017

    @rebornix
    Contributor

    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.

  10. jdfwarrior commented on Mar 23, 2017

    @jdfwarrior

    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?

  11. 31 remaining items

  12. jrieken commented on Sep 21, 2018

    @jrieken
    Contributor

    Good news: Current Insiders has a rough version of this already and with next Insiders this will be working. This is how:

    • you can put snippets in the .vscode-folder of your workspace (but not inside subfolders of that)
    • only snippet files with the .code-snippets extension are supported
    • the insert snippet command and completions show that a snippet is a workspace snippet
    • with the configure snippet command you can create workspace snippets

    screen shot 2018-09-21 at 11 38 56

  13. added a commit that references this issue on Sep 21, 2018
  14. jdforsythe commented on Sep 21, 2018

    @jdforsythe
    Author

    Thank you! This is why we love VS Code

  15. ffxsam commented on Sep 21, 2018

    @ffxsam

    Thanks, team!

  16. Ash258 commented on Sep 21, 2018

    @Ash258
    Contributor

    you can put snippets in the .vscode-folder of your workspace (but not inside subfolders of that)

    Johannes Rieken (@jrieken) Love this, but can we expect support for subfolders? (best way .vscode\snippets\*.code-snipets).

  17. added
    verification-needed
    on Sep 24, 2018
  18. jrieken commented on Sep 24, 2018

    @jrieken
    Contributor

    Jakub Čábera (@Ash258) We are always a little scared of subfolders because there might be many, many...

  19. rebornix commented on Sep 24, 2018

    @rebornix
    Contributor

    🚀 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.

  20. added
    verified
    on Sep 26, 2018
  21. rebornix commented on Sep 26, 2018

    @rebornix
    Contributor

    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 👍

  22. locked and limited conversation to collaborators on Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestrelease-notessnippetsverification-neededverified

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions