From 32e37c2ef2b740d8ca59872d4414ecb0d19b32ee Mon Sep 17 00:00:00 2001 From: William Douglas Date: Sun, 28 Nov 2021 18:47:50 -0800 Subject: [PATCH] Added support for Verilog. --- README.md | 10 +++---- .../language-configuration.verilog.json | 27 +++++++++++++++++++ .../multi-line-configuration.json | 5 ++-- .../single-line-configuration.json | 3 ++- package.json | 6 ++++- 5 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 language-configuration/language-configuration.verilog.json diff --git a/README.md b/README.md index 0a11efa..68e358d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ You can now use single line comment blocks for languages with `//`, `#`, or `;` The Language Support section shows which languages are supported. See the Settings section for how to add single line comment support to languages that are not officially supported. ### Multi-line Comment Blocks -This feature has not changed, but support has now been added for Less, Objective-C/C++, and Swift. +This feature has not changed, but support has now been added for Less, Objective-C/C++, Verilog, and Swift. ## Usage ![Demo](https://raw.githubusercontent.com/kevinkyang/auto-comment-blocks/master/img/demo.gif) @@ -30,9 +30,9 @@ You can insert single line comment blocks for languages with `//`, `#`, or `;` s | Comment Style | Language Support | | ------- | ------- | -| `/** */` | 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 | +| `/** */` | C, C++, Verilog, C#, CSS, Go, Groovy, Java, Less, Objective C/C++, PHP, Sass, Rust, Swift | +| `/*! */` | C, C++, Verilog | +| `//`, `///` | C, C++, Verilog, C#, F#, Go, Groovy, Java, JavaScript, Less, Objective C/C++, PHP, Rust, Sass, Swift, TypeScript | | `#` | CoffeeScript, Dockerfile, Makefile, Perl, PowerShell, Python, R, Ruby, YAML | | `;` | Clojure | @@ -62,4 +62,4 @@ Please create an issue in the [repository](https://github.com/kevinkyang/auto-co ### 1.0.0 - Add multi-line comment support for Less, Objective-C/C++, and Swift. -- Add single-line comment blocks for most officially supported languages. See README for more information. \ No newline at end of file +- Add single-line comment blocks for most officially supported languages. See README for more information. diff --git a/language-configuration/language-configuration.verilog.json b/language-configuration/language-configuration.verilog.json new file mode 100644 index 0000000..efbafff --- /dev/null +++ b/language-configuration/language-configuration.verilog.json @@ -0,0 +1,27 @@ +{ + "comments": { + "lineComment": "//", + "blockComment": ["/*", "*/"] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "[", "close": "]" }, + { "open": "{", "close": "}" }, + { "open": "(", "close": ")" }, + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "\"", "close": "\"", "notIn": ["string"] }, + { "open": "/**", "close": " */", "notIn": ["string"] }, + { "open": "/*!", "close": " */", "notIn": ["string"] } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} \ No newline at end of file diff --git a/language-configuration/multi-line-configuration.json b/language-configuration/multi-line-configuration.json index f41886b..e023bc8 100644 --- a/language-configuration/multi-line-configuration.json +++ b/language-configuration/multi-line-configuration.json @@ -13,6 +13,7 @@ "php", "rust", "scss", - "swift" + "swift", + "verilog" ] -} \ No newline at end of file +} diff --git a/language-configuration/single-line-configuration.json b/language-configuration/single-line-configuration.json index fce0efd..603c059 100644 --- a/language-configuration/single-line-configuration.json +++ b/language-configuration/single-line-configuration.json @@ -15,6 +15,7 @@ "rust", "scss", "swift", + "verilog", "typescript" ], "#": [ @@ -31,4 +32,4 @@ ";": [ "clojure" ] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 3f7eb37..6a46d99 100644 --- a/package.json +++ b/package.json @@ -111,6 +111,10 @@ { "id": "go", "configuration": "./language-configuration/language-configuration.go.json" + }, + { + "id": "verilog", + "configuration": "./language-configuration/language-configuration.verilog.json" } ], "keybindings": [ @@ -134,4 +138,4 @@ "@types/node": "^6.0.40", "@types/mocha": "^2.2.32" } -} \ No newline at end of file +}