Skip to content

Commit 79ec697

Browse files
committed
Address 'no scope' warning
A scope should be provided when accessing `[xml]` settings, otherwise a warning is emitted. This change provides `file:///` as the scope. Fixes redhat-developer/vscode-yaml#972 Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent 410cff9 commit 79ec697

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/languageserver/handlers/settingsHandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class SettingsHandler {
4040
const config = await this.connection.workspace.getConfiguration([
4141
{ section: 'yaml' },
4242
{ section: 'http' },
43-
{ section: '[yaml]' },
43+
{ section: '[yaml]', scopeUri: 'null' },
4444
{ section: 'editor' },
4545
{ section: 'files' },
4646
]);

test/settingsHandlers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ describe('Settings Handlers Tests', () => {
369369
expect(workspaceStub.getConfiguration).calledOnceWith([
370370
{ section: 'yaml' },
371371
{ section: 'http' },
372-
{ section: '[yaml]' },
372+
{ section: '[yaml]', scopeUri: 'null' },
373373
{ section: 'editor' },
374374
{ section: 'files' },
375375
]);
@@ -409,7 +409,7 @@ describe('Settings Handlers Tests', () => {
409409
expect(workspaceStub.getConfiguration).calledOnceWith([
410410
{ section: 'yaml' },
411411
{ section: 'http' },
412-
{ section: '[yaml]' },
412+
{ section: '[yaml]', scopeUri: 'null' },
413413
{ section: 'editor' },
414414
{ section: 'files' },
415415
]);

0 commit comments

Comments
 (0)