Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Python terminal completion provider #24776

Open
Tyriar opened this issue Feb 3, 2025 · 0 comments
Open

Implement Python terminal completion provider #24776

Tyriar opened this issue Feb 3, 2025 · 0 comments
Assignees
Labels
area-terminal feature-request Request for new features or functionality

Comments

@Tyriar
Copy link
Member

Tyriar commented Feb 3, 2025

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

@Tyriar Tyriar added the feature-request Request for new features or functionality label Feb 3, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 3, 2025
@anthonykim1 anthonykim1 added area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-terminal feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants