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.

Adopt SnippetString API

See original GitHub issue

With the December release VS Code will have real API to define a CompletionItem that is inserted as snippet, for details see https://github.com/Microsoft/vscode/issues/3210.

In short, we now support a subset of the more common TextMate syntax: $1, $2 etc define tabstops, ${1:value} and ${2:this is${3:nested}} placeholders, and $0 is for the final tabstop.

The API for this is contained in a new type SnippetString. It can be used as the insertText of a CompletionItem.

During a transition phase we will still support the internal, unspecified snippet syntax your extension is using but eventually remove it (roughly 2 or 3 milestones from now).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
DanTupcommented, Nov 17, 2016

Great, thanks for the heads up!

Note-to-me: Here’s an example of this migration (TypeScript) as a reference.

0reactions
DanTupcommented, Dec 15, 2016

I think the issue is that the internal API used underscore as the final cursor position (see https://github.com/Microsoft/vscode/issues/6874#issuecomment-235606255) but in 1.8 it renders a real underscore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adopt SnippetString API #99 - redhat-developer/vscode-java
The API for this is contained in a new type SnippetString . It can be used as the insertText of a CompletionItem. During...
Read more >
Bountysource
Adopt SnippetString API.
Read more >
Extension Guides - Visual Studio Code
Learn from Visual Studio Code extension guides and code samples.
Read more >
Manage creatives for buyers | Buyer APIs - Google Developers
You can do the following as a buyer: Create and submit creatives for review; View existing creatives; Patch existing creatives. Submit creatives ...
Read more >
vscode.SnippetString - Haxe externs for Visual Studio Code
A snippet string is a template which allows to insert text and to control the editor cursor when insertion happens.
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