-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add support for pyright #2472
Comments
microsoft/pyright#99 I left a comment here asking how a command line utility for starting the language server for other editors like Vim can be built. I think it's worth building that, instead of running it from scratch from the command line. |
I'd love to see this. I've tried mypy, pytype, and pyre, and I have to say, pyright has blown me away so far. It's type checker is much better and seems to catch many more edge cases that other checkers simply miss. I'd be happy to help add support for pyright in Ale. However, I'm uncertain how to go about doing that. It sounds like we need two things:
While I'm fuzzy on the details of how LSP-compatible fixers are configured, I'm more uncertain about how to go about #2. From microsoft/pyright#99, it sounds as though pyright itself can't currently be used to run the Language Server in a stand-alone way. But I'm unclear why not. Is it too tightly coupled with VSCode? Or would it need an additional CLI command to start up the language server that they don't want to add? I was surprised to see them pushing for a separate project that would expose the language server for other IDEs. It seems a bit silly and against the spirit of LSP to develop a tool like that that is only compatible with VSCode? Any advice on how best to proceed would be great! |
I think someone needs to write a pyright CLI tool in JavaScript/TypeScript. At the moment clients can only connect to pyright if they are written in JavaScript/TypeScript and import the JavaScript/TypeScript code. |
@alok @lkgarrison you can use pyright in vim/neovim with coc-pyright+coc.nvim, and they all works well with ALE. https://github.com/fannheyward/coc-pyright |
To elaborate on this further, I see that there is a node cli app available: https://github.com/microsoft/pyright/#command-line So it is possible possible to use it without importing it trough JS/TS code. |
It's now possible to add this to ALE as of microsoft/pyright#810 If someone doesn't jump on this and open a PR before me, I might be able to get to it in the next week or two (time allowing). |
I'll probably try to add support for this myself. Some rambling on what I want to do with it... I was thinking of using |
I've added |
Name: foobar
URL: https://foo.bar.com
https://github.com/Microsoft/pyright Like mypy.
The text was updated successfully, but these errors were encountered: