onivim/oni

TypeScript: Hook up auto-import functionality

Open

#1593 aperta il 21 feb 2018

Vedi su GitHub
 (12 commenti) (3 reazioni) (1 assegnatario)TypeScript (336 fork)batch import
bountybounty-100enhancementhelp wanted

Metriche repository

Star
 (11.389 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor