-
Notifications
You must be signed in to change notification settings - Fork 13.4k
TSServer: snippet completions #25207
Copy link
Copy link
Closed
Labels
Domain: LS: TSServerIssues related to the TSServerIssues related to the TSServerIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Metadata
Metadata
Assignees
Labels
Domain: LS: TSServerIssues related to the TSServerIssues related to the TSServerIn DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Provide a generic, cross editor snippet type that can be used to express complex text insertion operations. At a minimum, these snippets should include placeholder values and indicate where the cursor should end up.
For example, snippets could fill in function call arguments with placeholders. If the user completes
adtoaddhere:The inserted snippet would be:
Where the user can tab from the placeholder values
«x»to«y».Use Cases
useCodeSnippetsOnMethodSuggest)Why is this needed
Snippets speed up coding and provide additional hints while writing code. VS Code already tries to convert TS's existing response types to snippets but fails to handle many edge cases. In order to improve reliability and support more advanced used cases such as microsoft/vscode#48562, I believe that TS needs to start generating these snippets directly