Skip to content

Release v1.2.0: Enable language definitions to be auto updated and reconfigured when user settings change. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yCodeTech
Copy link
Owner

@yCodeTech yCodeTech commented Jan 6, 2025

Release v1.2.0 adds ability to automatically update it's language definitions and reconfigure the comment blocks when user settings change.

Changelog Brief Overview:

Added:

  • Added the ability to automatically update the extension's language definitions and reconfigure the comment blocks support when user settings change.

  • Added new user setting:

    • auto-comment-blocks.supportUnsupportedLanguages as the new and preferred way of adding unsupported languages for comment support for all single and multi-line comment blocks. The setting combines the old individual settings into one setting so it's easier to detect when they change. The object properties have the same names as the now deprecated individual settings: multiLineStyleBlocks, slashStyleBlocks, hashStyleBlocks, semicolonStyleBlocks.
  • Added an on change event for the new supportUnsupportedLanguages setting to detect when the user changes the settings, and then uses the new updateSingleLineCommentLanguageDefinitions public method to update the language definitions.

Deprecated:

The following user settings are now deprecated:

  • auto-comment-blocks.slashStyleBlocks
  • auto-comment-blocks.hashStyleBlocks
  • auto-comment-blocks.semicolonStyleBlocks
  • auto-comment-blocks.multiLineStyleBlocks

They all have deprecation description warnings that are shown in the settings.json file. These settings also no longer appear in the Settings UI panel, in favour of the new combined setting auto-comment-blocks.supportUnsupportedLanguages.

These deprecated settings will be removed in the major version v2.0.0.

…ings have changed.

Added:

- A new user setting: `auto-comment-blocks.supportUnsupportedLanguages`. This is the new and preferred way of adding unsupported languages to be supported for all single and multi-line comment blocks.

The `supportUnsupportedLanguages` object combines the old individual settings into one setting so it's easier to detect when they change.

The properties have the same names as the now deprecated individual settings: `multiLineStyleBlocks`, `slashStyleBlocks`, `hashStyleBlocks`, `semicolonStyleBlocks`.

- `updateSingleLineCommentLanguageDefinitions` public method to update the single-line comment language definitions.

- An on change event for the new supportUnsupportedLanguages setting instead of the multiple events for the deprecated old settings, making the code DRY. Also added code to call the new `updateSingleLineCommentLanguageDefinitions` method to update the language definitions when the user changes the settings.

- `getCustomSupportedLangConfigurationValue` method to get the custom supported language configuration value for the specified key. If the old user settings have values, then it will use the old deprecated setting, otherwise it will get the value from the new `supportUnsupportedLanguages` setting. Changed all relevant code in the `setSingleLineCommentLanguageDefinitions` method to use this new method of getting the user config settings.

Deprecated:

The following user settings are now deprecated:
- `auto-comment-blocks.slashStyleBlocks`
- `auto-comment-blocks.hashStyleBlocks`
- `auto-comment-blocks.semicolonStyleBlocks`
- auto-comment-blocks.multiLineStyleBlocks

They all have deprecation description warnings that are shown in the settings.json. These settings also no longer appear in the Settings UI panel, in favour of the new combined setting `auto-comment-blocks.supportUnsupportedLanguages`.

These deprecated settings will be removed in the major version v2.0.0

Removed:

- The on change events for the deprecated individual settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant