@@ -112,7 +112,7 @@ export class LanguagerClientDocumentSelectors {
112
112
{ scheme : "file" , language : "plaintext" , pattern : "**/.swift-version" } ,
113
113
] ;
114
114
115
- static allHandledDocumentTypes ( ) : DocumentSelector {
115
+ static sourcekitLSPDocumentTypes ( ) : DocumentSelector {
116
116
let documentSelector : SourceKitDocumentSelector ;
117
117
switch ( configuration . lsp . supportCFamily ) {
118
118
case "enable" :
@@ -142,9 +142,15 @@ export class LanguagerClientDocumentSelectors {
142
142
return configuration . lsp . supportedLanguages . includes ( doc . language ) ;
143
143
} ) ;
144
144
documentSelector . push ( ...LanguagerClientDocumentSelectors . documentationDocumentSelector ) ;
145
- documentSelector . push ( ...LanguagerClientDocumentSelectors . miscelaneousDocumentSelector ) ;
146
145
return documentSelector ;
147
146
}
147
+
148
+ static allHandledDocumentTypes ( ) : DocumentSelector {
149
+ return [
150
+ ...this . sourcekitLSPDocumentTypes ( ) ,
151
+ ...LanguagerClientDocumentSelectors . miscelaneousDocumentSelector ,
152
+ ] ;
153
+ }
148
154
}
149
155
150
156
export function lspClientOptions (
@@ -159,7 +165,7 @@ export function lspClientOptions(
159
165
) => void
160
166
) : LanguageClientOptions {
161
167
return {
162
- documentSelector : LanguagerClientDocumentSelectors . allHandledDocumentTypes ( ) ,
168
+ documentSelector : LanguagerClientDocumentSelectors . sourcekitLSPDocumentTypes ( ) ,
163
169
revealOutputChannelOn : RevealOutputChannelOn . Never ,
164
170
workspaceFolder : workspaceFolder ,
165
171
outputChannel : new SwiftOutputChannel ( "SourceKit Language Server" ) ,
0 commit comments