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

VSCode User Snippet not working inside other snippet #78420

Closed
ghost opened this issue Aug 3, 2019 · 2 comments
Closed

VSCode User Snippet not working inside other snippet #78420

ghost opened this issue Aug 3, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 3, 2019

I created some VSCode User Snippet, but it not working inside other snippet.

This is newest version of VSCode, 1.36.

If I have this snippet,

    "tmp": {
        "prefix": "tmp",
        "body": [
            "#include <bits/stdc++.h>",
            "using namespace std;",
            "",
            "int main()",
            "{",
            "    ${1:int} ans;",
            "    ${2:/* code */}",
            "    return 0;",
            "}"
        ],
        "description": "template"
    },

and trying this snippet inside $2 above,

    "cin1": {
        "prefix": "cin1",
        "body": [
            "int a;",
            "cin >> a;"
        ],
        "description": "template"
    },

it never works, and show nothing in completion.

I'd like to show completion inside snippet.
Any helps are appreciated.

@ArturoDent
Copy link

ArturoDent commented Aug 5, 2019

Set this to false (as in deselect the checkbox in the settings panel) :

"editor.suggest.snippetsPreventQuickSuggestions": false

The default is true and will prevent your inside snippet from working as a snippet.

(I see I just answered your question on SO) :>}

@ghost
Copy link
Author

ghost commented Aug 5, 2019

Thank you very much!
It works!

@ghost ghost closed this as completed Aug 5, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 19, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant