javascript-typescript-langserver icon indicating copy to clipboard operation
javascript-typescript-langserver copied to clipboard

Use textEdit in completionItem

Open yeahio opened this issue 7 years ago • 0 comments

When requesting completions for JavaScript, CompletionItems are currently very simple, including only the label to specify the text to be inserted.

By contrast, for TypeScript they do include an insertText property, which, however, is deprecated in favor of textEdit.

TextEdits have the big advantage that they let the server specify a range to replace. This would particularly make sense in the context of issue #489 when proposing CompletionItems that replace existing content.

yeahio avatar Jul 12 '18 13:07 yeahio