question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

insertText marked as deprecated

See original GitHub issue

insertText marked as deprecated here: https://github.com/microsoft/vscode-languageserver-node/blob/9de8809400b7c443bc25f211dfaddcb74675b2d7/types/src/main.ts#L1467

The docs say to use textEdit instead, which is misleading. As the only way I can create working snippets is to populate insertText.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Jun 3, 2019

Done.

1reaction
dbaeumercommented, May 24, 2019

The problem is that the insert position for the text edit needs to cover the whole region to be replaced not only the remaining part. So if the user types T and then code complete is computed the insert edit needs to look like

textEdit: TextEdit.insert(Position.create(position.line, position.character - 1), 'TypeScript'),

This being said I think we should consider to un-deprecate insertText since there we do the prefix matching automatically since both are strings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NSTextView's insertText method is deprecated in OS X v10.11 ...
The documentation says. - (void)insertText:(id)aString. This method is the means by which text typed by the user enters an NSTextView .
Read more >
[Answer]-NSTextField insertText method is deprecated, what ...
I have a NSTextField where I would like to enter text at the insertion point. I have a code that don't generate errors:...
Read more >
Document.execCommand() - Web APIs | MDN
execCommand(). Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed ...
Read more >
insertText(_:) | Apple Developer Documentation
Inserts aString into the receiver's text at the insertion point if there is one, otherwise replacing the selection. macOS 10.0–10.11 Deprecated ...
Read more >
Deprecated List (Java SE 18 & JDK 18) - Oracle Help Center
The Applet API is deprecated, no replacement. java.awt.Graphics.finalize(). Finalization has been deprecated for removal. See Object.finalize() for background ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found