mirror of https://github.com/microsoft/vscode.git
Migrate built-in php extension off of CompletionItem.textEdit (#248574)
Fix #237860
This commit is contained in:
parent
4c6769207e
commit
7c92ae8b6b
|
@ -3,9 +3,9 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { CompletionItemProvider, CompletionItem, CompletionItemKind, CancellationToken, TextDocument, Position, Range, TextEdit, workspace, CompletionContext } from 'vscode';
|
||||
import * as phpGlobals from './phpGlobals';
|
||||
import { CancellationToken, CompletionContext, CompletionItem, CompletionItemKind, CompletionItemProvider, Position, Range, TextDocument, workspace } from 'vscode';
|
||||
import * as phpGlobalFunctions from './phpGlobalFunctions';
|
||||
import * as phpGlobals from './phpGlobals';
|
||||
|
||||
export default class PHPCompletionItemProvider implements CompletionItemProvider {
|
||||
|
||||
|
@ -56,7 +56,8 @@ export default class PHPCompletionItemProvider implements CompletionItemProvider
|
|||
|
||||
if (beforeWord === '<?') {
|
||||
const proposal = createNewProposal(CompletionItemKind.Class, '<?php', null);
|
||||
proposal.textEdit = new TextEdit(new Range(twoBeforePosition, position), '<?php');
|
||||
proposal.insertText = '<?php';
|
||||
proposal.range = new Range(twoBeforePosition, position);
|
||||
result.push(proposal);
|
||||
return Promise.resolve(result);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue