onivim/oni

TypeScript: Hook up auto-import functionality

Open

#1,593 opened on 2018年2月21日

GitHub で見る
 (12 comments) (3 reactions) (1 assignee)TypeScript (11,389 stars) (336 forks)batch import
bountybounty-100enhancementhelp wanted

説明

Splitting out from #1326 - integrate 'auto-import' functionality from TypeScript. This should generalize to other completion providers, too.

  • Implement additionalTextEdits and textEdit for CompletionItems as defined by the completion request in the language server protocol: https://microsoft.github.io/language-server-protocol/specification
  • Update our TypeScriptServerHost to send additionalTextEdits for auto-imports. This will involve settting the includeExternalModuleExports for the completions request, hooking up entry details resolution to get information about the additional code actions as part of the details request, and resolving those code actions to text edits. Looks like we'll need to plumb the 'source' through somehow, as this is needed when calling to get details.

コントリビューターガイド