microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.26k stars 12.38k forks source link

[Meta] Support Inline Completions related features. #45001

Open Kingwl opened 3 years ago

Kingwl commented 3 years ago

Suggestion

🔍 Search Terms

inline, completions

✅ Viability Checklist

My suggestion meets these guidelines:

⭐ Suggestion

VScode has supported inline completions: https://github.com/microsoft/vscode/blob/main/src/vs/vscode.proposed.d.ts#L2576.

Let's find out what can we do with the new API.

Kingwl commented 3 years ago

I guess we could ping @mjbvz .

Kingwl commented 2 years ago

I think we should add the support even we do not have some feature yet.

I want to provide some inline completions by my ts plugin. But there's no way to do that without the ts support.

We have already supported custom events hander for plugin. But we also have to support the inline completion at the vscode side.

So, friendly ping @mjbvz , Shall we add the inline completion support at typescript vscode extension without typescript's implementation? If not. I think we should add the protocol first, and we can just return empty response.

andrewbranch commented 2 years ago

What are inline completions?

mjbvz commented 2 years ago

Here's the proposed VS Code api: https://github.com/microsoft/vscode/issues/124024 and https://github.com/microsoft/vscode/blob/019867139e8818908d65c814816acc3119c5dd1f/src/vs/vscode.proposed.d.ts#L2456

I believe Copilot uses them shows an inline preview of the suggested text while still letting you use normal completions

I think we should hold off on merging anything until the VS Code side of this api is finalized. There are a few open questions with the existing proposal