From 218f89158170faf591ebff7cbcdfbe9e81398ec1 Mon Sep 17 00:00:00 2001 From: Kevin Yang Date: Mon, 18 Sep 2017 22:28:55 -0700 Subject: [PATCH] add Go multiline, YAML single-line --- README.md | 4 +-- .../language-configuration.go.json | 28 +++++++++++++++++++ .../multi-line-configuration.json | 1 + .../single-line-configuration.json | 3 +- package.json | 4 +++ 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 language-configuration/language-configuration.go.json diff --git a/README.md b/README.md index 3332fd3..0a11efa 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,10 @@ You can insert single line comment blocks for languages with `//`, `#`, or `;` s | Comment Style | Language Support | | ------- | ------- | -| `/** */` | C, C++, C#, CSS, Groovy, Java, Less, Objective C/C++, PHP, Sass, Rust, Swift | +| `/** */` | C, C++, C#, CSS, Go, Groovy, Java, Less, Objective C/C++, PHP, Sass, Rust, Swift | | `/*! */` | C, C++ | | `//`, `///` | C, C++, C#, F#, Go, Groovy, Java, JavaScript, Less, Objective C/C++, PHP, Rust, Sass, Swift, TypeScript | -| `#` | CoffeeScript, Dockerfile, Makefile, Perl, PowerShell, Python, R, Ruby | +| `#` | CoffeeScript, Dockerfile, Makefile, Perl, PowerShell, Python, R, Ruby, YAML | | `;` | Clojure | ## Settings diff --git a/language-configuration/language-configuration.go.json b/language-configuration/language-configuration.go.json new file mode 100644 index 0000000..9c7917a --- /dev/null +++ b/language-configuration/language-configuration.go.json @@ -0,0 +1,28 @@ +{ + "comments": { + "lineComment": "//", + "blockComment": [ "/*", "*/" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + { "open": "`", "close": "`", "notIn": ["string"]}, + { "open": "\"", "close": "\"", "notIn": ["string"]}, + { "open": "'", "close": "'", "notIn": ["string", "comment"]}, + ["/**", " */"] + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"], + ["`", "`"] + ] +} \ No newline at end of file diff --git a/language-configuration/multi-line-configuration.json b/language-configuration/multi-line-configuration.json index 53e06ed..f41886b 100644 --- a/language-configuration/multi-line-configuration.json +++ b/language-configuration/multi-line-configuration.json @@ -4,6 +4,7 @@ "cpp", "csharp", "css", + "go", "groovy", "java", "less", diff --git a/language-configuration/single-line-configuration.json b/language-configuration/single-line-configuration.json index 1e873e9..fce0efd 100644 --- a/language-configuration/single-line-configuration.json +++ b/language-configuration/single-line-configuration.json @@ -25,7 +25,8 @@ "powershell", "python", "r", - "ruby" + "ruby", + "yaml" ], ";": [ "clojure" diff --git a/package.json b/package.json index bd770c1..42b3cce 100644 --- a/package.json +++ b/package.json @@ -107,6 +107,10 @@ { "id": "rust", "configuration": "./language-configuration/language-configuration.rust.json" + }, + { + "id": "go", + "configuration": "./language-configuration/language-configuration.go.json" } ], "keybindings": [