-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Adopt SnippetString API #25
Comments
@jrieken Thanks for the heads up. We really appreciate you reaching out to us! Also, whenever you are at Microsoft's Redmond campus in the future, ping me. I'd love to meet and talk with you about your work on VS Code. |
@eriklieben We should definitely move on this when we can to stay ahead of these changes. |
Yes! The above is incredible! Thanks @jrieken! When the old autocompleted stopped working in 1.6.0, I tried to push TextMate snippet string into the insertText param :-) And discovered it didn't work that way, then I started looking at the custom implementation of the HTML language server. Was looking at how I could refactor that code to be easier to extend and basically, accept TextMate snippet strings. So I am very very happy with this :-) Will try to get this into the extension during the weekend, my evenings are a bit booked this week. If nothing changes in my schedule, then we will have this ready to release at 1 Dec together with the 1.8.0 release of vscode. |
@jrieken do you maybe know how to get around this issue/ did you also experience this? / how did you solve it :-) Repository:\vscode-extension [snippetString ≡]> npm install vscode-languageserver-types@next -D On trying to install the vnext package of the types I get invalid on each of the 3.0.1 packages, while I am using Typescript 2.0.3. |
@eriklieben just test this and it works for me and installs |
With the December release VS Code will have real API to define a CompletionItem that is inserted as snippet, for details see microsoft/vscode#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 theinsertText
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).
The language server protocol supports the SnippetString in its next-branch - see microsoft/vscode#15577 (comment)
The text was updated successfully, but these errors were encountered: