@@ -30,8 +30,7 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
3030 hostDocumentPosition : vscode . Position ,
3131 projectedPosition : vscode . Position ,
3232 context : vscode . CompletionContext ,
33- language : LanguageKind ,
34- razorDocument : vscode . TextDocument
33+ language : LanguageKind
3534 ) {
3635 if ( projectedUri ) {
3736 // "@" 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
172171 }
173172 }
174173
175- this . addUsingKeyword ( language , razorDocument , hostDocumentPosition , completionItems ) ;
176-
177174 const isIncomplete = completions instanceof Array ? false : completions ? completions . isIncomplete : false ;
178175 return new vscode . CompletionList ( completionItems , isIncomplete ) ;
179176 }
@@ -229,8 +226,7 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
229226 position ,
230227 projection . position ,
231228 context ,
232- projection . languageKind ,
233- document
229+ projection . languageKind
234230 ) ;
235231
236232 return completionList ;
@@ -287,38 +283,6 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem
287283
288284 return item ;
289285 }
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- }
322286}
323287
324288function getTriggerKind ( triggerKind : vscode . CompletionTriggerKind ) : CompletionTriggerKind {
0 commit comments