The Wayback Machine - https://web.archive.org/web/20201109063247/https://github.com/Microsoft/python-language-server/issues/800
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use textEdit instead of insertText for completion #800

Open
jakebailey opened this issue Mar 20, 2019 · 0 comments
Open

Use textEdit instead of insertText for completion #800

jakebailey opened this issue Mar 20, 2019 · 0 comments

Comments

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Mar 20, 2019

insertText is technically deprecated in favor of providing a text edit specifically.

	/**
	 * A string that should be inserted into a document when selecting
	 * this completion. When `falsy` the label is used.
	 *
	 * The `insertText` is subject to interpretation by the client side.
	 * Some tools might not take the string literally. For example
	 * VS Code when code complete is requested in this example `con<cursor position>`
	 * and a completion item with an `insertText` of `console` is provided it
	 * will only insert `sole`. Therefore it is recommended to use `textEdit` instead
	 * since it avoids additional client side interpretation.
	 *
	 * @deprecated Use textEdit instead.
	 */
	insertText?: string;

It'd likely be a good idea to move on to using the non-deprecated field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.