Skip to content

API for Alternate Python Language Servers #24850

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

Open
kinto0 opened this issue Feb 27, 2025 · 1 comment
Open

API for Alternate Python Language Servers #24850

kinto0 opened this issue Feb 27, 2025 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@kinto0
Copy link

kinto0 commented Feb 27, 2025

It was mentioned here that there could soon an API that will support alternate language servers.

I would be super excited about integrating my language server into the python extension and am happy to help as much as I can. The only alternative I can imagine without this API is modifying user settings with the configuration api (setting python.languageServer to None) before spinning up our own extension.

I'm starting this thread since I don't already see any public discussion about this but please let me know if I'm duplicating anything.

@kinto0 kinto0 added the feature-request Request for new features or functionality label Feb 27, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 27, 2025
@kinto0
Copy link
Author

kinto0 commented Mar 11, 2025

for more context, here is an early preview of it

karthiknadig pushed a commit that referenced this issue Apr 23, 2025
…4987)

For #24850

Summary:
Background:
A new typechecker called Pyrefly will be featured at Pycon with a
[talk](https://us.pycon.org/2025/schedule/presentation/118/),
[website/sandbox](https://pyrefly.org/) (still WIP), and
[extension](https://marketplace.visualstudio.com/items?itemName=meta.pyrefly)
(still WIP). This extension will provide ultrafast typechecking and
language services. When the Pyrefly extension is installed,
`ms-python.python` should not start Jedi or Pylance unless
[`python.pyrefly.disableLanguageServices`](facebook/pyrefly@4d7e23c)
is set to `true`.


Because of the separation of vscode's `getExtensions` API and config
reading logic, I chose to augment `DefaultLSType` with fallback
information in case Pyrefly is disabled. This lets `configSettings` pick
the correct jedi/pylance without knowing if Pyrefly will be enabled or
disabled.

Test Plan:
still can't get pyright to work in the local extension build but I do
see my breakpoints hit and the correct languageServer set


https://github.com/user-attachments/assets/395bacbb-7ad0-4357-b084-cd5e88062801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants