Skip to content

Commit

Permalink
Supported extension view link
Browse files Browse the repository at this point in the history
- Changed:
  - Use command-links for links to other extensions:  
    In `Dependency is not installed` warning message notification  
    Instead of linking to extension's Marketplace page link to VSCode `EXTENSIONS` view focused to the linked extension via `workbench.extensions.search` command-link
  • Loading branch information
EduardSergeev committed Aug 30, 2023
2 parents c226230 + 3068ac0 commit 4ab528e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log
All notable changes to the "Haskutil" extension will be documented in this file.

## [0.12.2] - 2023-08-31
### Changed
* `Dependency not installed` warning message extension links:
Instead of linking to extension's Marketplace page link to VSCode `EXTENSIONS` view
Focused to linked extension via `workbench.extensions.search` command-link

## [0.12.1] - 2023-08-30
### Fixed
* `CHANGELOG` formatting:
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "haskutil",
"displayName": "Haskutil",
"description": "'QuickFix' actions for Haskell editor",
"version": "0.12.1",
"version": "0.12.2",
"publisher": "Edka",
"repository": {
"url": "https://github.com/EduardSergeev/vscode-haskutil"
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function activate(context: vscode.ExtensionContext) {
function checkDependencies() {
const dependencies = Configuration.supportedDependencies;
if(!dependencies.find(extension => vscode.extensions.getExtension(extension.id))) {
const toLink = ({id, name}) => `[${name}](https://marketplace.visualstudio.com/items?itemName=${id})`;
const toLink = ({id, name}) => `[${name}](${vscode.Uri.parse(`command:workbench.extensions.search?["@id:${id}"]`)})`;
const items = dependencies.map(toLink);
const warningSetting = `${Configuration.rootSection}.${Configuration.checkDiagnosticsExtensionSection}`;
const warningLink = `[${Configuration.checkDiagnosticsExtensionSection}](${vscode.Uri.parse(`command:workbench.action.openSettings?["${warningSetting}"]`)})`;
Expand Down

0 comments on commit 4ab528e

Please sign in to comment.