From 5ade2db3093ba6b5c1a9e122c9b8da9a91a192c3 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 9 Oct 2025 12:00:32 -0400 Subject: [PATCH] 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 https://github.com/redhat-developer/vscode-yaml/issues/972 Signed-off-by: David Thompson --- src/languageserver/handlers/settingsHandlers.ts | 2 +- test/settingsHandlers.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/languageserver/handlers/settingsHandlers.ts b/src/languageserver/handlers/settingsHandlers.ts index d72a42e28..88acc1b7d 100644 --- a/src/languageserver/handlers/settingsHandlers.ts +++ b/src/languageserver/handlers/settingsHandlers.ts @@ -40,7 +40,7 @@ export class SettingsHandler { const config = await this.connection.workspace.getConfiguration([ { section: 'yaml' }, { section: 'http' }, - { section: '[yaml]' }, + { section: '[yaml]', scopeUri: 'file:///' }, { section: 'editor' }, { section: 'files' }, ]); diff --git a/test/settingsHandlers.test.ts b/test/settingsHandlers.test.ts index 1438aad3d..e97f6cae4 100644 --- a/test/settingsHandlers.test.ts +++ b/test/settingsHandlers.test.ts @@ -369,7 +369,7 @@ describe('Settings Handlers Tests', () => { expect(workspaceStub.getConfiguration).calledOnceWith([ { section: 'yaml' }, { section: 'http' }, - { section: '[yaml]' }, + { section: '[yaml]', scopeUri: 'file:///' }, { section: 'editor' }, { section: 'files' }, ]); @@ -409,7 +409,7 @@ describe('Settings Handlers Tests', () => { expect(workspaceStub.getConfiguration).calledOnceWith([ { section: 'yaml' }, { section: 'http' }, - { section: '[yaml]' }, + { section: '[yaml]', scopeUri: 'file:///' }, { section: 'editor' }, { section: 'files' }, ]);