emacs-lsp / lsp-pyright

lsp-mode :heart: pyright
https://emacs-lsp.github.io/lsp-pyright
GNU General Public License v3.0
284 stars 24 forks source link

Adds support for the basedpyright pyright fork #101

Closed zipy124 closed 2 weeks ago

zipy124 commented 2 weeks ago

This PR addresses issue: #92

All commands that use "pyright/" are now instead created via concatenating the fork with the command. This can be customised with the lsp-pyright-fork customizable option.

use of "backquote" command instead of " ' " is because of an emacs-lisp bug please see: https://stackoverflow.com/questions/17394638/nesting-backquote-and-in-emacs-lisp and https://mail.gnu.org/archive/html/bug-gnu-emacs/2023-02/msg00617.html

All suggestions welcome, this is my first time contributing emacs-lisp code so I am not well versed with the standard practices :)

seagle0128 commented 2 weeks ago

I merged and changed lsp-pyright-fork to lsp-pyright-langserver-command. Thanks!

zipy124 commented 2 weeks ago

I merged and change lsp-pyright-fork to lsp-pyright-langserver-command. Thanks!

Thank you for the quick review, changes and merge!

Overall it looks good, except lsp-pyright-fork option. I am afraid it's confusing. And, are all options and arguments of pyright and basedpyright just same?

Of the options provided by this module they are all the same (I think). I have unfortunately run into the fact that the options are not all the same for the full list, for example:

python.analysis.typeCheckingMode vs basedpyright.analysis.typeCheckingMode

and further confusing matters:

basedpyright.analysis.useLibraryCodeForTypes vs python.analysis.useLibraryCodeForTypes or pyright.useLibraryCodeForTypes .

I'm unsure what the best option is here between the available options:

seagle0128 commented 1 week ago

Well, it's better keep the common configurations and leave the rest to the json file, IMO.