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

Python lsp better choice? #1172

Open
ayamir opened this issue Feb 11, 2024 · 11 comments
Open

Python lsp better choice? #1172

ayamir opened this issue Feb 11, 2024 · 11 comments
Labels
enhancement New feature or request lsp LSP related issues pylsp Python LSP Server related issues

Comments

@ayamir
Copy link
Owner

ayamir commented Feb 11, 2024

Feature description

As we discussed in #815, current pylsp doesn't support inlay-hint. Welcome for python developers to discuss a better choice.

Additional information

No response

@ayamir ayamir added the enhancement New feature or request label Feb 11, 2024
@ayamir
Copy link
Owner Author

ayamir commented Feb 11, 2024

As @Jint-lzxy said, the license terms of pylance explicitly prevent us from using it with anything other than the MS builds of VSCode, including VSCodium (AFAIK, at least)..

@aarnphm
Copy link
Collaborator

aarnphm commented Feb 17, 2024

Honestly, I'm waiting for Astral (the company that builds Ruff) to build a type checker, haha.

Will then use whatever they are cooking up there.

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Feb 19, 2024

seems very interesting
https://github.com/astral-sh/ruff-lsp
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#ruff_lsp

ruff-lsp supports surfacing Ruff diagnostics and providing Code Actions to fix them, but is intended to be used alongside another Python LSP in order to support features like navigation and autocompletion.

also, astral's new "pip" looks freaking fast too!
https://github.com/astral-sh/uv
https://youtu.be/YKDpiOU77xY

@aarnphm
Copy link
Collaborator

aarnphm commented Feb 19, 2024

already migrate my whole workflow to uv and rye haha

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Feb 20, 2024

already migrate my whole workflow to uv and rye haha

I guess it's this one? https://github.com/mitsuhiko/rye

from my interpretation, it looks like u purely use uv to install python pkgs and rye to manage the project env?

@aarnphm
Copy link
Collaborator

aarnphm commented Feb 20, 2024

ye, think of rye as better pdm

@Mythos-404
Copy link

Take a look at this pyright fork repository basedpyright which supports a number of features missing from pylsp.

@CharlesChiuGit
Copy link
Collaborator

CharlesChiuGit commented Mar 18, 2024

Take a look at this pyright fork repository basedpyright which supports a number of features missing from pylsp.

nice.
and it's now supported by nvim-lspconfig.
worth a shoot.

@Jint-lzxy Jint-lzxy added lsp LSP related issues pylsp Python LSP Server related issues labels Apr 4, 2024
@CharlesChiuGit
Copy link
Collaborator

i think it's very hard to do the migration if we're talking about 1-to-1 mapping.

Take ruff as an example, we use it as a linter/formatter right now.
So if we need to separate it from our current LSP, which is pylsp, we need to config ruff in none-ls, and it's quite hard to do since ruff doesn't provide well-documented way to config in cli, but only file-based configs.

If we make a file-based config, then we need to add that file in ruff's none-ls config to make it valid, and that will conflict with user's project ruff config.

i dont think there's a KISS way to do default config with basedpyright + ruff + black.

@CharlesChiuGit
Copy link
Collaborator

Honestly, I'm waiting for Astral (the company that builds Ruff) to build a type checker, haha.

Will then use whatever they are cooking up there.

@aarnphm isn't ruff have type checker within? Or where can i check their road map?

@aarnphm
Copy link
Collaborator

aarnphm commented Apr 23, 2024

ruff is not a type checker, it is a linter. the LSP is just a lint server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lsp LSP related issues pylsp Python LSP Server related issues
Projects
None yet
Development

No branches or pull requests

5 participants