Skip to content

python-lsp-server vs Pyright language server. #90

Open

Description

@hongyi-zhao

What's the difference between python-lsp-server and pyright? See also the related issue here.

Regards,
HZ

Activity

  1. changed the title [-]python-language-server vs Pyright language server.[/-] [+]python-lsp-server vs Pyright language server.[/+] on Sep 21, 2021
  2. mkubasz commented on Sep 21, 2021

    @mkubasz

    CPU usage. In my case, pls use fewer CPU resources then pyrigth.

  3. krassowski commented on Sep 21, 2021

    @krassowski
    Member

    For one python-lsp-server is written in Python but pyright is written in TypeScript. Depending on how well you know each of the languages you may find it easier to contribute to one project or the other (but presumably it would be easier for target audience to contribute to python-lsp-server). pyright is a more recent server and has a strong emphasis on typing support (but you need to configure it to do so as the actual typing are only distributed in the closed-source pylance). Also pyright requires you to install node.js and npm, which is something that many users prefer to avoid. Finally before contributing to pyright you would need to sign a CLA with Microsoft, whereas python-lsp-server is more of an open source community supported project.

  4. krassowski commented on Sep 21, 2021

    @krassowski
    Member

    pyright also supports some undocumented behaviour of LSP like sending null to close signature requests, as it well comes from the creators of LSP.

  5. ccordoba12 commented on Sep 23, 2021

    @ccordoba12
    Member

    @krassowski, that sounds interesting. Could we implement sending null's here too?

  6. krassowski commented on Sep 25, 2021

    @krassowski
    Member

    I think so. There are some other things to improve for signatures too, like recognising that signature overloading is now common in Python and sending these multiple signatures to the user instead of the first one only.

  7. MicEsp22 commented on Jan 14, 2024

    @MicEsp22

    @krassowski "There are some other things to improve for signatures too, like recognising that signature overloading is now common in Python and sending these multiple signatures to the user instead of the first one only."

    I came here for this exact point. Is it fixed or worked on?
    In Neovim, a weird behaviour persists as of today. When querying for signature help, only the first one is shown, even though the syntax itself suggests the use of an overloaded method (in the picture, it concerns the get() intrinsic dict class method.)
    immagine

    On the other hand, when querying for signature hover (in insert mode, while typying the function parameters), both overloads are shown, but on the same line, which makes it hard to distinguish (this is probably caused by how the client (Neovim) handles the situation):
    immagine

    But it is bizarre the fact that the server only provides the first match in one case, and both in the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions