@@ -30,8 +30,7 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
30
30
hostDocumentPosition : vscode . Position ,
31
31
projectedPosition : vscode . Position ,
32
32
context : vscode . CompletionContext ,
33
- language : LanguageKind ,
34
- razorDocument : vscode . TextDocument
33
+ language : LanguageKind
35
34
) {
36
35
if ( projectedUri ) {
37
36
// "@" is not a valid trigger character for C# / HTML and therefore we need to translate
@@ -172,8 +171,6 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
172
171
}
173
172
}
174
173
175
- this . addUsingKeyword ( language , razorDocument , hostDocumentPosition , completionItems ) ;
176
-
177
174
const isIncomplete = completions instanceof Array ? false : completions ? completions . isIncomplete : false ;
178
175
return new vscode . CompletionList ( completionItems , isIncomplete ) ;
179
176
}
@@ -229,8 +226,7 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
229
226
position ,
230
227
projection . position ,
231
228
context ,
232
- projection . languageKind ,
233
- document
229
+ projection . languageKind
234
230
) ;
235
231
236
232
return completionList ;
@@ -287,38 +283,6 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
287
283
288
284
return item ;
289
285
}
290
-
291
- private static addUsingKeyword (
292
- language : LanguageKind ,
293
- razorDocument : vscode . TextDocument ,
294
- hostDocumentPosition : vscode . Position ,
295
- completionItems : vscode . CompletionItem [ ]
296
- ) {
297
- // This is an ugly hack, but it's needed to get the "using" keyword to show up in the completion list.
298
- // The reason it doesn't show up is because the C# generated document puts the position of the cursor
299
- // at '__o = [||]', which isn't a valid location for a using statement.
300
- if ( language == LanguageKind . CSharp ) {
301
- const line = razorDocument . lineAt ( hostDocumentPosition . line ) ;
302
- const lineText = line . text . substring ( 0 , hostDocumentPosition . character ) ;
303
- if (
304
- lineText . endsWith ( '@' ) ||
305
- lineText . endsWith (
306
- '@u' ||
307
- lineText . endsWith ( '@us' ) ||
308
- lineText . endsWith ( '@usi' ) ||
309
- lineText . endsWith ( '@usin' ) ||
310
- lineText . endsWith ( '@using' )
311
- )
312
- ) {
313
- const usingItem = new vscode . CompletionItem ( 'using' , vscode . CompletionItemKind . Keyword ) ;
314
-
315
- // Matching Roslyn's documentation behavior
316
- ( < CompletionItem > usingItem ) . documentation = vscode . l10n . t ( '{0} Keyword' , 'using' ) ;
317
-
318
- completionItems . push ( usingItem ) ;
319
- }
320
- }
321
- }
322
286
}
323
287
324
288
function getTriggerKind ( triggerKind : vscode . CompletionTriggerKind ) : CompletionTriggerKind {
0 commit comments