Skip to content

Warnings in extension development #98

Open
@Eskibear

Description

@Eskibear

Not a blocking issue. Just some annoying warning messages in debug console if I have xml extension installed.

[redhat.vscode-xml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[xml]', provide the URI of a resource or 'null' for any resource.
[redhat.vscode-xml] Accessing a window scoped configuration for a resource is not expected. To associate 'xml.completion.autoCloseTags' to a resource, define its scope to 'resource' in configuration contributions in 'package.json'.

The first one:

let closeBrackets = configXML.get("[xml]")["editor.autoClosingBrackets"];

let configXML = workspace.getConfiguration(undefined, null), ConfigXML.get("[xml]") should work.

The second one:

disposable = activateTagClosing(tagRequestor, { xml: true, xsl: true }, 'xml.completion.autoCloseTags');

if (!workspace.getConfiguration(void 0, document.uri).get<boolean>(configName)) {

vscode-xml/package.json

Lines 152 to 156 in 32b586c

"xml.completion.autoCloseTags": {
"type": "boolean",
"default": true,
"description": "Enable/disable autoclosing of XML tags. \n\nIMPORTANT: Turn off editor.autoClosingTags for this to work",
"scope": "window"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Pending review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions