onivim/oni

TypeScript: Hook up auto-import functionality

Open

#1,593 建立於 2018年2月21日

在 GitHub 查看
 (12 留言) (3 反應) (1 負責人)TypeScript (11,389 star) (336 fork)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.

貢獻者指南