@@ -22,9 +22,6 @@ const fadedDecoration = vscode.window.createTextEditorDecorationType({
2222let pendingLaunchJsonDecoration : NodeJS . Timer ;
2323
2424export function activate ( context : vscode . ExtensionContext ) : void {
25- //keybindings.json command-suggestions
26- context . subscriptions . push ( registerKeybindingsCompletions ( ) ) ;
27-
2825 //settings.json suggestions
2926 context . subscriptions . push ( registerSettingsCompletions ( ) ) ;
3027
@@ -94,23 +91,6 @@ function autoFixSettingsJSON(willSaveEvent: vscode.TextDocumentWillSaveEvent): v
9491 vscode . workspace . applyEdit ( edit ) ) ;
9592}
9693
97- function registerKeybindingsCompletions ( ) : vscode . Disposable {
98- const commands = vscode . commands . getCommands ( true ) ;
99-
100- return vscode . languages . registerCompletionItemProvider ( { pattern : '**/keybindings.json' } , {
101-
102- provideCompletionItems ( document , position , _token ) {
103- const location = getLocation ( document . getText ( ) , document . offsetAt ( position ) ) ;
104- if ( location . path [ 1 ] === 'command' ) {
105-
106- const range = document . getWordRangeAtPosition ( position ) || new vscode . Range ( position , position ) ;
107- return commands . then ( ids => ids . map ( id => newSimpleCompletionItem ( JSON . stringify ( id ) , range ) ) ) ;
108- }
109- return undefined ;
110- }
111- } ) ;
112- }
113-
11494function registerSettingsCompletions ( ) : vscode . Disposable {
11595 return vscode . languages . registerCompletionItemProvider ( { language : 'jsonc' , pattern : '**/settings.json' } , {
11696 provideCompletionItems ( document , position , token ) {
@@ -207,16 +187,6 @@ function provideInstalledExtensionProposals(extensionsContent: IExtensionsConten
207187 return undefined ;
208188}
209189
210- function newSimpleCompletionItem ( label : string , range : vscode . Range , description ?: string , insertText ?: string ) : vscode . CompletionItem {
211- const item = new vscode . CompletionItem ( label ) ;
212- item . kind = vscode . CompletionItemKind . Value ;
213- item . detail = description ;
214- item . insertText = insertText || label ;
215- item . range = range ;
216-
217- return item ;
218- }
219-
220190function updateLaunchJsonDecorations ( editor : vscode . TextEditor | undefined ) : void {
221191 if ( ! editor || path . basename ( editor . document . fileName ) !== 'launch.json' ) {
222192 return ;
0 commit comments