We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf7346b commit 1cc33b4Copy full SHA for 1cc33b4
src/completion/xml/NamespaceCompletionProvider.ts
@@ -55,10 +55,19 @@ export class NamespaceCompletionProvider extends XmlSuggestionProvider<Completio
55
return [];
56
}
57
58
+ const startsWithBackslash = value.startsWith('\\');
59
+
60
+ if (startsWithBackslash) {
61
+ value = value.replace(/^\\/, '');
62
+ }
63
64
const completions = namespaceIndexData.findNamespacesByPrefix(value);
65
66
return completions.map(namespace => {
- const item = new CompletionItem(namespace.fqn, CompletionItemKind.Value);
67
+ const item = new CompletionItem(
68
+ startsWithBackslash ? `\\${namespace.fqn}` : namespace.fqn,
69
+ CompletionItemKind.Value
70
+ );
71
item.range = range;
72
return item;
73
});
0 commit comments