All notable changes to this extension will be documented in this file.
This Changelog uses the Keep a Changelog structure.
1.1.16 - 2026-06-03
-
Fixed ENOENT error with the new VScode commit hash directory for Windows built in extensions in WSL (#33) by @yCodeTech
This pull request improves the way the extension discovers and handles the Windows built-in extensions path when running inside WSL (Windows Subsystem for Linux). It introduces robust detection logic to support both legacy and new VS Code installation paths, adds error handling and user notifications for failures, and ensures that discovery failures are only surfaced once per session/activation.
Fixes #32.
Windows built-in extensions path resolution improvements:
- Added logic in
ExtensionDatato detect both the legacy and new hashed commit-based install paths for built-in extensions under WSL, including directory scanning and caching of results to avoid repeated disk access. - Added error handling and user notification for failures to resolve the built-in extensions path, including logging and a one-time warning message with an option to open the output channel.
- Introduced new constructor options and internal flags in
ExtensionDatato control whether discovery path failures should notify the user, preventing duplicate warnings from multiple instances.
Integration and usage updates:
- Updated the extension activation in
extension.tsto pass the new constructor parameter, enabling user notification for the main extension instance only. - Updated
Configurationlogic to handle cases where the Windows extensions paths are not resolved, preventing errors by falling back to empty arrays.
- Added logic in
1.1.15 - 2026-04-19
-
Fixed update vscode types package and clean up now unused line comment types (#26) by @yCodeTech
VScode updated their types to include the LineComment typings and released 1.110 of @types/vscode package. So our temporary custom
LineCommenttype andLineCommentConfiginterface is now redundant.- Updated @types/vscode package to 1.110.
- Removed the temporary
LineCommenttype andLineCommentConfiginterface, and removed the references in configuration file.
-
Refactored extension activation and performance improvements (#29) by @yCodeTech
-
Refactored the
activatefunction to set up the logger first, initialize extension data and configuration. -
Ensured that development environment variables are only loaded when not in production mode, i.e. in development or testing modes.
-
Consolidated multiple configuration change handlers into a single handler that checks for a list of settings requiring extension reload. If any are changed, a single reload prompt is shown using the new
showReloadMessagehelper function, reducing code duplication. -
Improved performance and event handling to prevent memory leaks by properly disposing of old comment configurations.
-
-
Refactored configuration class (#30) by @yCodeTech
-
Extracted the logic for determining the appropriate Blade or HTML comment style into a new private method
getBladeOrHtmlComments, simplifying the public API and improving clarity. ThesetBladeCommentsmethod now only sets the configuration and no longer returns values based on anonStartflag (the flag was removed in favour using the new private method directly). -
Replaced repetitive code for adding custom single-line comment languages with a new private method
addCustomSingleLineLanguages, reducing duplication and improving maintainability. -
Replaced
varwithletfor variable declarations in several places to align with modern best practices.
-
1.1.14 - 2026-02-23
This release focuses on improving the code quality, maintainability and readability of the code. There are no new features or breaking changes in this release, but it includes various fixes from the previous pre-release.
View the full changelog.
-
See fixes from 1.1.13 Pre-release 1
-
Fix typings and introduce interfaces to improve type safety, code maintainability and readability via PR #20.
1.1.13 Pre-release 1 - 2025-12-08
- Fixes various errors brought up in comments in #14 via PR #17
- Fixes
Invalid Symbolparsing error due to the file being encoded with a Byte Order Mark (BOM). Removed the BOM and explicitly read files as UTF-8 encoding. - Fixes
Value Expectedparsing error due to the parser erroring on empty files. Added an extra option to prevent erroring and allow empty files.
- Fixes
1.1.12 - 2025-12-05
-
The extension crashes on startup with the
Cannot convert undefined or null to objecterror. This is caused by theObject.keysinConfiguration::setLanguageConfigDefinitionsmethod because the config JSON file failed to parse in thereadJsonFileutil function which made the confignull.When the "jsonc-parser" package encounters a problem parsing the JSON via its
parsefunction, it just returnsnullinstead of erroring.-
Fixed by adding proper error handling, logging and showing a user error dialog when parse errors occur, directly from
readJsonFilefunction.If errors occur, the error will be thrown from
readJsonFilewhich will fail extension startup and crash, this is to provide easier debugging, instead of waiting for subsequent code that relies on the function from crashing the extension with an unrelated error.
-
1.1.11 - 2025-10-17
-
Fixes yCodeTech/auto-comment-blocks#13
VScode has inconsistencies between it's API and the language configuration JSON files. In the onEnter rules, JSON files have the property
action.indentwhereas the API hasaction.indentAction. When merging the auto-found language config files and the extension's onEnter comment rules, VScode couldn't handle the mixed formats properly, causing the braces to not expand correctly as documented in the issue.Fixed by normalizing the property to the API format and converting it's values.
1.1.10 - 2025-07-21
-
VS Code's
vscode.extensions.allAPI doesn't find any built-in extensions on the Windows-side when running in WSL. It only gets the WSL-installed extensions, which causes the extension not to work at all because the language configuration file is not found.The workaround fix is to manually read the Windows extensions directories when running in WSL and merge them with the WSL-installed extensions.
-
Fixed language support detection to properly respect disabled language settings.
Custom language configurations now correctly check if a language is disabled before applying support, preventing unwanted language activation.
-
Fixed support for languages with multiple extension configuration files by merging their configurations instead of overwriting them, ensuring complete language support. Also improved language configuration merging by properly handling comment configurations.
-
Added the ability to get the all extensions directly from the directory on non-WSL systems (eg. Windows) because VS Code's
extensions.allAPI only gets enabled extensions and doesn't include disabled ones, which could prevent language configs being found.- Removed
vscode.extensions.allAPI call fromfindAllLanguageConfigFilePathsmethod in favour of getting the extensions directly from the directories.
- Removed
-
Added new dependencies:
is-wslfor detecting WSL environments.package-json-typefor TypeScript type definitions of package.json.
-
Added macOS keybinding support (
cmd+shift+m) for the Blade override comments command.
-
Refactored extension architecture with improved separation of concerns.
Major code reorganisation including extraction of utility functions, centralised extension data management, and improved debugging capabilities.
-
Added new
ExtensionDataclass to centralize extension metadata management.This new class provides a clean interface for accessing extension details like ID, name, version, and various system paths, improving code organisation and maintainability.
-
Added new
utils.tsfile with shared utility functions.Extracted common functionality into reusable utility functions including JSON file operations, regex reconstruction, array merging, and data conversion utilities.
-
-
Updated debug logging to provide more comprehensive environment and configuration information. Enhanced diagnostic output now includes detailed extension paths for both WSL and native environments, making troubleshooting easier.
1.1.9 - 2025-07-12
-
Fixes #10
The
lineCommentlanguage config key has changed to be either a string or an object. With the object havingcommentandnoIndentkeys, which was introduced in VS Code's June 2025 release. This breaks the extension when encountering themakefilelanguage, and an error occurs:lineComment.includes is not a function
To fix:
- Added a check to see if the
lineCommentis an object with acommentkey inside, if it does then use the string value of thecommentkey. Otherwise, it will use the string value of thelineComment.
- Added a check to see if the
1.1.8 - 2025-06-19
-
Fixed
Logger::logMessagenot logging regex meta data. When a log's extradebugdata contains aRegExpobject,JSON.stringifycan not convert it to a string, so it just outputs an empty object{}in the Output channel. This is useless for debugging.Fixed by adding a new
Logger::metaReplacermethod to use as a replacer function in theJSON.stringifymethod's replacer arg. This new method will convert all instances ofRegExpto it's string representation ready for output in the channel.
-
Refactor
Logger::logMessageby moving theJSON.stringifycall to a newformatMetamethod. -
Refactored the logging of
debugmeta data objects in theConfiguration::constructormethod:-
Removed all
Object.fromEntriescalls from the debug logging in theConfiguration::constructormethod. -
Added a new
ifcondition in theLogger::metaReplacermethod, to allow allMapobjects to be converted to plain objects viaObject.fromEntries.
This prevents having to wrap multiple variables evaluating to
Mapobjects insideObject.fromEntriesthemselves, like it was done previously. -
-
Added the logging of:
- The extension's user config settings.
- Various VS Code environment info.
- Various System environment info.
This allows for a more complete debugging diagnostic report.
1.1.7 - 2025-06-13
- Added the ability to log debug information to a dedicated
Auto Comment Blockschannel in the Output panel. This is to help diagnose issues quicker.-
Added new
Loggerclass to implement the functionality of the logging info to the Output panel.Uses VScode's
OutputChannelinterface under the hood for logging, and creating the dedicatedAuto Comment BlocksOutput channel.Using this class we can log
info,debug, anderrormessages to the channel. Thedebugmethod can output objects and arrays. -
Added a call to the new Logger class in the main
extensionfile to initialise the logger, and setup the channel. -
Added a
infologger to theonDidOpenTextDocumentevent in the mainextensionfile, to make sure we can identify in the Output when the active language has changed before any other debug info is logged. -
Added the Logger's
disposeLoggermethod call to thedeactivatemethod in the mainextensionfile. -
Added a new private property and a new param in the
constructormethod of theConfigurationclass, to allow the instance of the logger created in the mainextensionfile to be carried over without being re-initialised. -
Added
infologs for the extension id and version to theconstructormethod of theConfigurationclass. -
Changed all
console.logto use the new logger.
-
1.1.6 - 2025-05-01
-
Added the ability to auto-publish to Open VSX Registry as well as VS Code Marketplace upon release (via GitHub Action) as requested in yCodeTech/auto-comment-blocks#5.
-
Added the ability for the extension to automatically create the
auto-generated-language-definitionsdirectory if it doesn't exist.This is because the auto-generated files will no longer be packaged into the .vsix file, therefore the directory won't exist either.
-
Added new
autoGeneratedDirproperty inConfigurationclass to define theauto-generated-language-definitionsdirectory. -
Changed both
singleLineLangDefinitionFilePathandmultiLineLangDefinitionFilePathproperties inConfigurationclass to use the newautoGeneratedDirproperty. -
Changed
writeJsonFilemethod inConfigurationclass to check if theauto-generated-language-definitionsdirectory exists, and to create it if it doesn't. This uses the newautoGeneratedDirproperty.
-
1.1.5 - 2025-03-02
- Fixes an
ENOENT: no such file or directoryerror in yCodeTech/auto-comment-blocks#4. When trying to find the extension's package.json. The file path used the current directory./, which is redundant while using__dirnameas well, and certain OS could interpret the file path/extensions/ycodetech.automatic-comment-blocks-1.1.4/out/src./../../package.jsondifferently, hence the ENOENT error. Fixed by removing the.before the slash.
1.1.4 - 2025-01-06
-
When
singleLineBlockOnEntersetting istrue, and when then cursor is in the middle of the text, eg.// text | text, the comment would not be continued on the next line whenenteris pressed. Therefore the text after the cursor would not be a comment on the new line and be classed as code. This makes commenting tedious when keeping it clean and tidy with max line lengths.Fixed by adding new regex rules to identify when there is text after the cursor. The rules are now merged and duplicates removed instead of just
concating. -
Fixed the known issue: if you enable the
singleLineBlockOnEntersetting, for some languages, including C, C++, Sass - pressingtabimmediately after breaking out of a comment block, will insert a commented line.This seems to only happen in languages without
indentationRules, so it's fixed by adding default indentation rules with empty strings.Note: Using empty strings shouldn't have any side effects, but please report an issue if you have any problems with indentation.
-
Fixed an undocumented change that was part of commit 504ce5b, which changed some regexes within the
handleSingleLineBlockmethod to use the default onEnterRules config regexes. This accessed the items using array indexes. However, adding more regex rules breaks this functionality for theauto-comment-blocks.singleLineBlockkeybinding command and will insert the wrong comment style by accessing the wrong array index.Reverted back to hardcoding these regexes instead, to keep them separated.
1.1.3 - 2024-12-29
Fixed single-line comments onEnter not working when indented.
Single-line comments when indented didn't add new commented lines when pressing enter. Due to more regex patterns not been recognised by VScode internally, and therefore doesn't work properly.
Fixed by reconstructing the regexes for the previousLineText property. Also reconstructed regexes for the remaining config properties: folding and indentationRules.
1.1.1 and 1.1.2 - 2024-12-27
Fixed single-line comments were not inserting new commented lines for any languages when pressing enter (when singleLineBlockOnEnter was set to true). This is caused by an unknown bug when setting configs with vscode.languages.setLanguageConfiguration() and it has regexes in the configs. The regexes weren't been used. By reconstructing the regex before the config is set, it fixes the issue. This also helps when the internal config has some malformed regexes, or regex as strings.
Also, in JavaScript and TypeScript files, pressing tab on an empty line may insert a * on that line. Probably the same bug as above, which fixes it. The above regex fix inadvertently fixes #2
Note: v1.1.1 of the extension was released on the marketplace by mistake without a changelog. The official bug fix is v1.1.2.
1.1.0 - 2024-12-22
A complete overhaul to enable automatic support for all languages that vscode finds internally (via built-in or 3rd party extensions) that has both a language configuration file, and a comments key in the file.
For a full changelog, view the release PR.
- All language configuration files and package.json contribution declaration, in favour of auto-supported languages. So this extension no longer needs to keep adding language support, as the extension does it automatically.
-
Added 3 new settings:
-
multiLineStyleBlocksto add support of multi-line block comment to the specified unsupported languages. -
overrideDefaultLanguageMultiLineCommentsto override the style of multi-line comments for a language for the native vscodeblockCommentcommand. -
bladeOverrideComments, to switch between HTML style<!-- -->comments, and Blade style{{-- --}}comments, when the file is using the Blade language.
-
-
Added a keyboard binding to enable/disable the
bladeOverrideCommentssetting, and a user information message appears to state whether enabled or disabled. -
Added support for
/* */. -
Added an event to reconfigure the comment blocks evertime a document is opened OR the document language has been changed.
-
Added a config file to define the default multi-line config comments and autoClosingPairs; and a config file to define language IDs the need to be skipped when auto finding the languages to support (because these languages are known not to have any config properties we're interested in.)
-
Added support for double semicolon
;;and double hash##comments.
v1.0.3 - 2022-09-17
- Added support for JavaScript and TypeScript multi-line block comments - a pull request by a-stewart for the original plugin. Fixes issue kevb34ns#27.
- Created a new language config file for Blade to use blade's comments as well as the multi-line block comments
- Updated various language config files to reflect a pull request by a-stewart for the original plugin.
- Added support for protocol buffers - a pull request by jun-sheaf for the original plugin.
- Added support for
//!comments - a pull request by Lucretiel for the original plugin and fixes the issue kevb34ns#25 - Added support for csharp(c#) (using the cpp(c++) config file) - Fixes the issue kevb34ns#41.
- Updated the support for
/*! */comments and including the!on every line.
- Added support for PHP Blade.
Forked by @yCodeTech from here upwards.
- Add multi-line support for Rust, Go
- Add single-line support for YAML
- 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.
- Fix a bug that broke the extension, caused by the previous bugfix.
- Fix bug that that caused every language to have single-line block comments.
- Add single-line blocks for C/C++ (disabled by default).
- Add comment completion for PHP files.
- Add Javadoc-style comments for Groovy files.
- Fixed misspelled filename leading to C functionality breaking.
- Change extension description to include support for new languages.
- Added block comment completion for CSS/Sass files.
- Add QDoc (Qt-style) comment block completion for C and C++.
- Fix major typo that caused an asterisk to be inserted following any indented line.
- Changelog now starts with the latest update rather than the oldest.
- Fixed an issue that caused asterisk insertion and indentation bugs when indenting using an odd number of spaces.
- Changed
galleryBanner.theme, again.
- Changed
galleryBanner.theme.
- Initial release