shalupov / idea-cloudformation

AWS CloudFormation plugin for IntelliJ-based IDEs (IntelliJ IDEA, RubyMine, WebStorm, PhpStorm, PyCharm, AppCode, Android Studio, DataGrip, CLion)
https://teamcity.jetbrains.com/viewType.html?buildTypeId=IdeaAwsCloudFormation_Master_Build&guest=1
Apache License 2.0
136 stars 27 forks source link

Auto-detection of yaml templates not working #129

Closed jaymccon closed 6 years ago

jaymccon commented 6 years ago

First off I'd like to thank you for such a great plugin, I've tried many CFN plugins for different IDE's and your's is by far one of the best I've used.

I am unable to get the auto-detection of cfn files working, the only way to get the plugin to detect cfn files is to go to Preferences -> Editor -> File Types -> AWS Cloud... and register filetype patterns. Then I also need to delete all the patterns associated with yaml to prevent those associations from taking preference. If the file is YAML I also need to add a .yaml extension, otherwise it is detected as json

Plugin version: 0.5.64 IntelliJ version:

PyCharm 2018.1 (Professional Edition) Build #PY-181.4203.547, built on March 26, 2018
JRE: 1.8.0_152-release-1136-b20 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.6

The template I am using is a yaml formatted file with AWSTemplateFormatVersion: '2010-09-09' on the first line. Full template is here

Thanks!

andrew-glenn commented 6 years ago

+1

shalupov commented 6 years ago

Thanks!

I found some conflicts between YAML & JSON detection, it should be fixed in the next version

shalupov commented 6 years ago

@jaymccon Please try v0.5.66 (should be in updates)

jaymccon commented 6 years ago

Thanks for the update.

If I associate *.template toCloudFormation YAML under file type preferences then everything works as expected, including json formatted templates with the .template file extension.

Might want to either set this by default or document somewhere that this is required.