From 0c7e17e282f31faf042eb6c195ac826b5928ff6b Mon Sep 17 00:00:00 2001 From: Kevin Yang Date: Fri, 15 Sep 2017 15:10:32 -0700 Subject: [PATCH] 1.0.0 release --- CHANGELOG.md | 4 ++ README.md | 47 +++++++++++++------ .../multi-line-configuration.json | 10 ++-- .../single-line-configuration.json | 1 - package.json | 14 ++---- 5 files changed, 46 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6110b8a..1cc82b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this extension will be documented in this file. +## [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. + ## [0.3.2] - Fix a bug that broke the extension, caused by the previous bugfix. diff --git a/README.md b/README.md index 24d3401..cd3cd42 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,18 @@ # Auto Comment Blocks -A simple VS Code extension for C, C++, C#, CSS/Sass, PHP, Java, and Groovy that ports VS Code's JavaScript block comment completion functionality. +Provides block comment completion for Javadoc-style multi-line comments and single-line comment blocks for most officially supported languages. + +## MAJOR CHANGES IN 1.0 UPDATE (Please Read) + +A lot has changed in this update. Please open issues for any bugs you encounter. + +### Single-line Comment Blocks +You can now use single line comment blocks for languages with `//`, `#`, or `;` style single line comments. Press `Shift+Enter` while on a commented line to insert a new commented line with the same level of indentation. See the Settings section for how to change the behavior so that `Enter` inserts a commented line while `Shift+Enter` breaks out of the comment block (this only works correctly for a subset of languages right now). + +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. ## Usage ![Demo](https://raw.githubusercontent.com/kevinkyang/auto-comment-blocks/master/img/demo.gif) @@ -11,8 +23,8 @@ Type `/**` to start a block comment, then hit the Enter key, and the extension w ### QDoc-style (Qt) comment blocks Use `/*!` in C/C++ files to start a QDoc comment block. -### New: "single-line" block comments for C/C++ -You must enable this feature explicitly (see 'Extension Settings'). Hit Enter on a line that begins with `//` or `///` to create a comment block where each line is a single-line comment. To break out of the comment block, press Shift+Enter (this shortcut can be changed). +### New: "single-line" block comments +You can insert single line comment blocks for languages with `//`, `#`, or `;` style single line comments. Press `Shift+Enter` while on a commented line to insert a new commented line with the same level of indentation. See the Settings section for issues and more options. ### Language Support @@ -21,26 +33,33 @@ You must enable this feature explicitly (see 'Extension Settings'). Hit Enter on | `/** */` | C, C++, C#, CSS, Groovy, Java, Less, Objective C/C++, PHP, Sass, Swift | | `/*! */` | C, C++ | | `//`, `///` | C, C++, C#, F#, Go, Groovy, Java, JavaScript, Less, Objective C/C++, PHP, Rust, Sass, Swift, TypeScript | -| `#` | CoffeeScript, Dockerfile, Makefile, Perl, PHP, PowerShell, Python, R, Ruby | +| `#` | CoffeeScript, Dockerfile, Makefile, Perl, PowerShell, Python, R, Ruby | | `;` | Clojure | -## Feature requests -Currently, this extension supports C, C++, C#, CSS/Sass, PHP, Java, and Groovy. If you want to suggest a feature or request support for a specific language, please create an issue in the [repository](https://github.com/kevinkyang/auto-comment-blocks/issues). In the interest of keeping this extension simple and lightweight, some features may not be possible right now. +## Settings -## Extension Settings +Reload the extension after changing any settings. -* `auto-comment-blocks.languages`: Comment completion will be enabled for the languages in this list. -* `auto-comment-blocks.singleLineBlocksEnabled`: For C/C++, this enables auto comment blocks for comments beginning with `//` or `///`. Press Shift+Enter to break the comment block. Disabled by default. +* `auto-comment-blocks.singleLineBlockOnEnter`: If enabled, pressing `Enter` inserts a new commented line at the same indentation, and pressing `Shift+Enter` breaks the comment block. + + **Caution**: This feature is buggy in many languages (see Issues section), but it seems to work fine for C, C++, Go, Less, PHP, Ruby, and Sass. +* `auto-comment-blocks.disabledLanguages`: Add languageIds here to disable any comment completion for that language. +* `auto-comment-blocks.slashStyleBlocks`: Add languageIds here to enable '//' and '///'-style single line comment blocks for that language. +* `auto-comment-blocks.hashStyleBlocks`: Add languageIds here to enable '#'-style single line comment blocks for that language. +* `auto-comment-blocks.semicolonStyleBlocks`: Add languageIds here to enable ';'-style single line comment blocks for that language. ## Issues -* Sometimes the completion/aseterisk insertion doesn't work. The reason is still unknown. It may go away if you reload your workspace. +* Single-line blocks using `Enter`: if you enable the `singleLineBlockOnEnter` setting, there are a few things to keep in mind: + + It seems to work find for C, C++, Go, Less, PHP, Ruby, and Sass. + + It doesn't work at all for Python, JavaScript, and TypeScript. + + For every other language, if you press `Tab` immediately after breaking out of a comment block, it will insert a commented line, for some unknown reason. +* Sometimes multi-line completion/aseterisk insertion doesn't work. The reason is still unknown. It may go away if you reload your workspace. * Currently, VS Code only allows extensions to overwrite, instead of modify, existing language configurations. This means that this extension may clash with another extension that overwrites the same language configurations, causing one or both not to work. In that case, uninstalling this extension is the only option for now. -Please create an issue in the Github repository if you find any bugs or have questions/requests. +Please create an issue in the [repository](https://github.com/kevinkyang/auto-comment-blocks/issues) if you find any bugs, or have questions or feature requests. ## Release Notes -### 0.3.0 -- Add single-line blocks for C/C++ (disabled by default). -- Add comment completion for PHP files. \ No newline at end of file +### 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 diff --git a/language-configuration/multi-line-configuration.json b/language-configuration/multi-line-configuration.json index fc676f3..3aa4132 100644 --- a/language-configuration/multi-line-configuration.json +++ b/language-configuration/multi-line-configuration.json @@ -4,11 +4,13 @@ "cpp", "csharp", "css", - "java", - "scss", "groovy", - "php", + "java", + "less", "objective-c", - "objective-cpp" + "objective-cpp", + "php", + "scss", + "swift" ] } \ No newline at end of file diff --git a/language-configuration/single-line-configuration.json b/language-configuration/single-line-configuration.json index 2300bec..1e873e9 100644 --- a/language-configuration/single-line-configuration.json +++ b/language-configuration/single-line-configuration.json @@ -22,7 +22,6 @@ "dockerfile", "makefile", "perl", - "php", "powershell", "python", "r", diff --git a/package.json b/package.json index a983853..9d6e5e3 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "auto-comment-blocks", "displayName": "Auto Comment Blocks", - "description": "A simple extension for C, C++, C#, CSS/Sass, PHP, Java, and Groovy that ports VS Code's JavaScript block comment completion functionality.", - "version": "0.3.2", + "description": "Provides block comment completion for Javadoc-style multi-line comments and single-line comment blocks for most officially supported languages.", + "version": "1.0.0", "publisher": "kevinkyang", "homepage": "https://github.com/kevinkyang/auto-comment-blocks", "repository": { @@ -29,14 +29,6 @@ ], "activationEvents": [ "*", - "onLanguage:c", - "onLanguage:cpp", - "onLanguage:csharp", - "onLanguage:css", - "onLanguage:java", - "onLanguage:scss", - "onLanguage:groovy", - "onLanguage:php", "onCommand:auto-comment-blocks.singleLineBlock" ], "main": "./out/src/extension", @@ -52,7 +44,7 @@ "auto-comment-blocks.disabledLanguages": { "type": "array", "default": [], - "description": "Add languageIds here to disable any comment completion for that language. See README for the list of supported languageIds." + "description": "Add languageIds here to disable any comment completion for that language." }, "auto-comment-blocks.slashStyleBlocks": { "type": "array",