From 51155f8368c16785e9d09ceb2ca31824ed68fd45 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 30 Apr 2025 14:03:19 -0400 Subject: [PATCH] Fix extension warnings We were accessing some scoped settings incorrectly; this should access them correctly. Fixes #98 Signed-off-by: David Thompson --- src/client/tagClosing.ts | 2 +- src/settings/settings.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/tagClosing.ts b/src/client/tagClosing.ts index 37f65c11..9aa95d6a 100644 --- a/src/client/tagClosing.ts +++ b/src/client/tagClosing.ts @@ -34,7 +34,7 @@ export function activateTagClosing(tagProvider: (document: TextDocument, positio if (!supportedLanguages[document.languageId]) { return; } - if (!workspace.getConfiguration(undefined, document.uri).get(configName)) { + if (!workspace.getConfiguration().get(configName)) { return; } isEnabled = true; diff --git a/src/settings/settings.ts b/src/settings/settings.ts index 17af2600..c459008d 100644 --- a/src/settings/settings.ts +++ b/src/settings/settings.ts @@ -107,9 +107,8 @@ function verifyVMArgs() { } function verifyAutoClosing() { - const configXML = workspace.getConfiguration(); - const closeTags = configXML.get("xml.completion.autoCloseTags"); - const closeBrackets = configXML.get("[xml]")["editor.autoClosingBrackets"]; + const closeTags = getXMLConfiguration().get('completion.autoCloseTags'); + const closeBrackets = workspace.getConfiguration('editor', { languageId: 'xml' }).get('autoClosingBrackets'); if (closeTags && closeBrackets != "never") { window.showWarningMessage( "The [xml].editor.autoClosingBrackets setting conflicts with xml.completion.autoCloseTags. It's recommended to disable it.",