dannysteenman / vscode-cloudformation-snippets

This extension adds snippets for all the AWS CloudFormation resources into Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=dannysteenman.cloudformation-yaml-snippets
Apache License 2.0
27 stars 8 forks source link

Enable snippets only for *.cfn.yaml files #9

Closed ojarosch closed 1 week ago

ojarosch commented 3 years ago

I'm often facing the problem, that vs-code thinks i want to write snippet when i usually just editing a non cfn-yaml file. Is there a possibility to change the valid fileending to .cfn.yaml, maybe as a settings option?

dannysteenman commented 1 week ago

I understand the issue and it can be quite annoying, however there's nothing I can do about it in vscode. When you create a snippet you can set the scope to trigger the autocomplete and that is determined by the language. I can't filter on filetype unfortunately.. see docs for more information: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-scope