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

Feature request: Inlay hint #397

Open
fecet opened this issue Jun 22, 2023 · 6 comments
Open

Feature request: Inlay hint #397

fecet opened this issue Jun 22, 2023 · 6 comments

Comments

@fecet
Copy link

fecet commented Jun 22, 2023

python still don't have avaliable language server support inlay hint, hope pylsp can be the hero 😄

@ccordoba12
Copy link
Member

Hey @fecet, thanks for reporting. What do you mean by this?

@fecet
Copy link
Author

fecet commented Jun 23, 2023

The inlay hint feature is stabilized in latest LSP Spec 3.17, and implemented in VSCode and Neovim.

Currently pylsp doesn't support that

@Amar1729
Copy link

Just as a note - inlay hints are supported by coc-pyright and VSCode's pylance, but notably not pyright (although I don't use either pylance, which requires VSCode, or coc-pyright).

@markis
Copy link

markis commented Jun 3, 2024

based-pyright supports inlay hints

@baco
Copy link
Contributor

baco commented Jun 3, 2024

Just as a note - inlay hints are supported by coc-pyright and VSCode's pylance, but notably not pyright.

I don't know coc-pyright approach, but:

  • VSCode's Pylance is not possible to make it work. It has proprietary licensing and does some checks against Microsoft's marketplace, that even VSCodium staff are having issues in giving the support for running outside VSCode.
  • VSCode's Pyright won't have the feature. Microsoft has chopped that functionality out, in favor of adding that to Pylance. Pylance and Pyright are, some how complimentary. Pyright does only type validation.

As @markis said, BasedPyright project supports that. And it's even more accessible for Python developers, since doesn't force users to install NodeJS (like coc-pyright o pyright require). It does install NodeJS behind the curtains though, but it's all encapsulated in a virtual environment, transparent to the Python developer.

@Amar1729
Copy link

Amar1729 commented Jun 4, 2024

Yeah, at this point i would definitely recommend basedpyright. It didn't exist at the time I made my comment lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants