python-lsp / pylsp-mypy

Mypy plugin for the Python LSP Server.
MIT License
118 stars 35 forks source link

Automatic installation of stubs #86

Open Susensio opened 1 month ago

Susensio commented 1 month ago

I'm trying to make mypy usage more user friendly. My use case is: I'm using neovim, installing pylsp and pylsp-mypy in a common venv.

Problem

When I have stub files missing, pylsp_mypy does not allow me to install them

Proposed solution

mypy has some flags --install-types --non-interactive that allows automatic installation of missing types, when possible.

I'm trying to achieve the same with pylsp_mypy using overrides, with no luck

Richardk2n commented 1 month ago

Please list your config. overrides are passed directly to mypy, so if it works in mypy it should work here.