Skip to content

Commit 6c495fa

Browse files
datho7561angelozerr
authored andcommitted
Specify schemes for which XML will provide support
I included a bunch of schemas that are used for remote files, so hopefully we don't drop support for editing remote files. Fixes #1063 Signed-off-by: David Thompson <[email protected]>
1 parent 7d8330b commit 6c495fa

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/client/languageParticipants.ts

+20-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import { Event, EventEmitter, extensions } from 'vscode';
77
import { DocumentFilter, DocumentSelector } from 'vscode-languageclient';
88

9+
const SCHEMES: string[] = [
10+
'untitled',
11+
'file',
12+
'ftp',
13+
'http',
14+
'https',
15+
'ssh',
16+
'streamfile',
17+
];
18+
919
/**
1020
* XML language participant contribution.
1121
*/
@@ -59,7 +69,16 @@ export function getLanguageParticipants(): LanguageParticipants {
5969

6070
return {
6171
onDidChange: onDidChangeEmmiter.event,
62-
get documentSelector() { return Array.from(languages); },
72+
get documentSelector() {
73+
return SCHEMES.flatMap(scheme => {
74+
return Array.from(languages).map(language => {
75+
return {
76+
language,
77+
scheme
78+
} as DocumentFilter;
79+
});
80+
});
81+
},
6382
hasLanguage(languageId: string) { return languages.has(languageId); },
6483
dispose: () => changeListener.dispose()
6584
};

0 commit comments

Comments
 (0)