Skip to content

Commit

Permalink
fix: Make sure the capabilities are correctly set (#2990)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Dec 29, 2023
1 parent 589b413 commit c2199a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@
],
"type": "commonjs",
"main": "./packages/client/dist/extension.js",
"contributes": {
"capabilities": {
"virtualWorkspaces": {
"supported": "limited",
"description": "In virtual workspaces, it is not possible to load the CSpell configuration from a JavaScript file. The configuration must be in a JSON, JSONC, or YAML file. Any configuration that relies upon `node_modules` will not be loaded."
},
"untrustedWorkspaces": {
"supported": false
},
"supported": false,
"description": "JavaScript configuration files will NOT be loaded."
}
},
"contributes": {
"menus": {
"editor/context": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/decorators/decorateExclusions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class SpellingExclusionsDecorator implements Disposable {
readonly context: vscode.ExtensionContext,
readonly client: CSpellClient,
) {
this._enabled = context.workspaceState.get(SpellingExclusionsDecorator.workspaceStateKey, false);
this.disposables.push(
() => this.clearDecoration(),
vscode.window.onDidChangeActiveTextEditor((e) => this.refreshEditor(e)),
Expand All @@ -34,7 +35,6 @@ export class SpellingExclusionsDecorator implements Disposable {
throttle(100),
).subscribe(() => this.handlePendingUpdates()),
);
this._enabled = context.workspaceState.get(SpellingExclusionsDecorator.workspaceStateKey, false);
}

get enabled() {
Expand Down

0 comments on commit c2199a9

Please sign in to comment.