Skip to content

Commit 9d5fa32

Browse files
author
AWS Scripting Guy
committed
updated readme
1 parent 1145bb9 commit 9d5fa32

File tree

1 file changed

+37
-28
lines changed

1 file changed

+37
-28
lines changed

README.md

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,55 @@
11
CloudFormation support for Visual Studio Code
22
===================
33

4-
This is fork of [ST3 CloudFormation plugin](https://github.com/beaknit/cform).
4+
This is a fork of [ST3 CloudFormation plugin](https://github.com/beaknit/cform).
55

66

77
Usage
88
-------------
99

1010
1. Install the extension
1111
2. Create **new file**
12-
3. Set syntax to **JSON**
12+
3. Set syntax to **JSON** or **YAML**
1313
4. Type **start** and press ```tab``` key to populate basic template skeleton
1414
5. **Start typing** desired **resource name** and hit ```tab``` key
1515

1616

17-
> **Note:** CloudFormation support works with JSON syntax selected or .json, .cform, .template file extensions. These are commonly used CloudFormation template extensions.
17+
> **Note:** CloudFormation support works with YAML/JSON syntax selected or .json, .cform, .template file extensions. These are commonly used CloudFormation template extensions.
1818
1919
![New template file](https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/master/assets/new_template_file.gif)
2020

21-
22-
YAML support
23-
-------------------
24-
25-
YAML template creation follows the same syntax rules: type **start** to populate new template.
26-
27-
Please make sure you update regularly as additional snippets are being continuosly added.
28-
29-
> **Note:** Requires installation of [YAML Language Server](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).
30-
31-
32-
Installation
33-
-------------------
34-
35-
1. Install Visual Studio Code 0.10.6 or higher
36-
2. Launch Code
37-
3. Invoke command palette by ```Ctrl-Shift-P``` (Windows, Linux) or ```Cmd-Shift-P``` (OSX)
38-
4. **Type** ```Extension```
39-
4. **Select** ```Install Extension```
40-
5. **Choose** extension **CloudFormation**
41-
6. Restart Visual Studio Code
42-
43-
![Installation](https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/master/assets/install_extension.gif)
21+
YAML templates
22+
------------------
23+
24+
Extension fully supports YAML templates. YAML template creation follows the same syntax rules: type **start** to populate new template.
25+
26+
YAML Language Server is required.
27+
1. Install [YAML Language Server](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
28+
2. Whitelist intrinsic function tags - paste preferences below into your User Settings (Ctrl + ,)
29+
30+
```json
31+
// Custom tags for the parser to use
32+
"yaml.customTags": [
33+
"!And",
34+
"!If",
35+
"!Not",
36+
"!Equals",
37+
"!Or",
38+
"!FindInMap",
39+
"!Base64",
40+
"!Cidr",
41+
"!Ref",
42+
"!Sub",
43+
"!GetAtt",
44+
"!GetAZs",
45+
"!ImportValue",
46+
"!Select",
47+
"!Split",
48+
"!Join"
49+
],
50+
// Enable/disable default YAML formatter (requires restart)
51+
"yaml.format.enable": true,
52+
```
4453

4554
Troubleshooting
4655
-------------------
@@ -55,9 +64,9 @@ Known issues
5564
When working with YAML documents, your current YAML language interpreter might not support syntax of AWS intrinsic functions, thus marking them as *unknown tag*.
5665
This however has no effect on validity of the YAML document.
5766

58-
You can solve this issue by [whitelisting custom tags in your user settings](https://github.com/aws-scripting-guy/cform-VSCode/blob/master/yaml.customTags.json).
67+
> **Note:** You can solve this issue by whitelisting specific tags following instructions under section **YAML Templates**.
5968
60-
> **Note:** Works only for Red Hat YAML Language Server
69+
> **Note:** Tested only with Red Hat YAML Language Server
6170
6271
![YAML known issue](https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/master/assets/known_issue1.png)
6372

0 commit comments

Comments
 (0)