Skip to content

Commit 5a96715

Browse files
committed
fix: keybindings, docs, and paths to enable usage on macOS.
1 parent 21bdd89 commit 5a96715

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Use `/*!` in all file types that support the normal `/*` comments to start a QDo
124124

125125
#### Normal comment blocks
126126

127-
Using the normal comment block `/* */` either typing manually or the native VScode command "Toggle Block Comment" (`editor.action.blockComment`, native keybinding `shift + alt + a`), the block will have the same on enter functionality as described above.
127+
Using the normal comment block `/* */` either typing manually or the native VScode command "Toggle Block Comment" (`editor.action.blockComment`, native keybinding <kbd>shift + alt + a</kbd> (macOS: <kbd>shift + option + a</kbd>)), the block will have the same on enter functionality as described above.
128128

129129
![block-comments](https://raw.githubusercontent.com/yCodeTech/auto-comment-blocks/master/img/block-comments.gif)
130130

@@ -156,9 +156,9 @@ Reload the extension after changing any settings.
156156

157157
- `auto-comment-blocks.multiLineStyleBlocks`: Add language IDs here to enable multi-line comment blocks support for that language, allowing unsupported languages to have comment completion. The default is `['blade', 'html']`"
158158

159-
- `auto-comment-blocks.overrideDefaultLanguageMultiLineComments`: A key : value pairing of language IDs and the beginning portion of a multi-line comment style, to override the default comment style for the vscode "Toggle Block Comment" `editor.action.blockComment` command (native Keybinding `shift + alt + a`). eg. `{'php': '/*!'}`
159+
- `auto-comment-blocks.overrideDefaultLanguageMultiLineComments`: A key : value pairing of language IDs and the beginning portion of a multi-line comment style, to override the default comment style for the vscode "Toggle Block Comment" `editor.action.blockComment` command (native Keybinding <kbd>shift + alt + a</kbd> (macOS: <kbd>shift + option + a</kbd>)). eg. `{'php': '/*!'}`
160160

161-
- `auto-comment-blocks.bladeOverrideComments`: When enabled, Blade-style block comments will be used in Blade contexts. Ie. `{{-- --}}` comments will be used instead of the HTML `<!-- -->` comments. Keybinding to enable/disable, default `ctrl + shift + m`. If `blade` language ID is set in the disabledLanguages, then the HTML `<!-- -->` comments will be used.
161+
- `auto-comment-blocks.bladeOverrideComments`: When enabled, Blade-style block comments will be used in Blade contexts. Ie. `{{-- --}}` comments will be used instead of the HTML `<!-- -->` comments. Keybinding to enable/disable, default <kbd>ctrl + shift + m</kbd> (macOS: <kbd>cmd + shift + m</kbd>). If `blade` language ID is set in the disabledLanguages, then the HTML `<!-- -->` comments will be used.
162162

163163
## Known Issues
164164

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@
7171
"auto-comment-blocks.overrideDefaultLanguageMultiLineComments": {
7272
"type": "object",
7373
"default": {},
74-
"markdownDescription": "A key : value pairing of language IDs and the beginning portion of a multi-line comment style, to override the default comment style for the vscode `command editor.action.blockComment` (native Keybinding `shift + alt + a`). eg. `{'php': '/*!'}`"
74+
"markdownDescription": "A key : value pairing of language IDs and the beginning portion of a multi-line comment style, to override the default comment style for the vscode `command editor.action.blockComment` (native Keybinding `shift + alt + a` (macOS: `shift + option + a`)). eg. `{'php': '/*!'}`"
7575
},
7676
"auto-comment-blocks.bladeOverrideComments": {
7777
"scope": "resource",
7878
"type": "boolean",
7979
"default": false,
80-
"markdownDescription": "When enabled, Blade style block comments will be used in Blade contexts. Ie. `{{-- --}}` comments will be used instead of the HTML `<!-- -->` comments. Keybinding to enable/disable, default `ctrl + shift + m`. If `blade` language ID is set in the disabledLanguages, then the HTML `<!-- -->` comments will be used."
80+
"markdownDescription": "When enabled, Blade style block comments will be used in Blade contexts. Ie. `{{-- --}}` comments will be used instead of the HTML `<!-- -->` comments. Keybinding to enable/disable, default `ctrl + shift + m` (macOS: `cmd + shift + m`). If `blade` language ID is set in the disabledLanguages, then the HTML `<!-- -->` comments will be used."
8181
}
8282
}
8383
},
@@ -90,6 +90,7 @@
9090
{
9191
"command": "auto-comment-blocks.changeBladeMultiLineBlock",
9292
"key": "ctrl+shift+m",
93+
"mac": "cmd+shift+m",
9394
"when": "editorTextFocus"
9495
}
9596
]

src/configuration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,12 @@ export class Configuration {
10851085
"WSL-installed User Extensions Path": path.join(vscode.env.appRoot, "../../", "extensions"),
10861086
};
10871087
} else {
1088+
// Get the user home directory from the environment variable:
1089+
// `USERPROFILE` on Windows, `HOME` on macOS/Linux.
1090+
const userHome = process.env.USERPROFILE || process.env.HOME;
10881091
extensionsPaths = {
10891092
"Built-in Extensions Path": builtInExtensionsPath,
1090-
"User Extensions Path": path.join(process.env.USERPROFILE, ".vscode", "extensions"),
1093+
"User Extensions Path": path.join(userHome, ".vscode", "extensions"),
10911094
};
10921095
}
10931096

0 commit comments

Comments
 (0)