KEMBAR78
Implement Python terminal completion provider · Issue #24776 · microsoft/vscode-python · GitHub
Skip to content

Implement Python terminal completion provider #24776

@Tyriar

Description

@Tyriar

There's an upcoming API from @meganrogge TerminalCompletionProvider that allows extensions to provide completions for the terminal. That's how the built-in extension does this:

Image

Combined with the shell type API, it should be possible to support completions in Python REPLs! We could do this basically by putting an adapter on the existing LSP with a "fake" text document made up of the terminal command line and cursor position (maybe more context later?).

@anthonykim1 and I put together a quick proof of concept that got completions showing a month or so ago.

API:

https://github.com/microsoft/vscode/blob/1fec88a0a63df190caf637357740919de96f75cb/src/vscode-dts/vscode.proposed.terminalCompletionProvider.d.ts#L1-L138

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions