tomv564 / pyls-mypy

Mypy plugin for the Python Language Server
MIT License
110 stars 62 forks source link

Using with emacs #37

Open oivvio opened 4 years ago

oivvio commented 4 years ago

This is not an actual issue. I'm just trying to get this plugin work with lsp-mode for emacs. I have mypy workon fine on the commandline and I have lsp-mode working fine in emacs.

When I add pyls-mypy to my virtualenv I get mypy messages in my buffers but it doesn't seem to be reading my mypy.ini

Any pointers on how to remedy that would be most welcome.

ksafford commented 4 years ago

This is sounds like my exact circumstance. I have tried setting flycheck-python-mypy-ini to point to a mypy config file and this doesn't seem to have any effect.

poppyschmo commented 4 years ago
(with-eval-after-load 'lsp-mode  ; try this or similar
    (lsp-register-custom-settings '(("pyls.plugins.pyls_mypy.enabled" t t))))

Also check *pyls::stderr* for complaints about a missing "future" package. Perhaps unrelated (maybe a regression of #1), but I had to install it manually before the plugin would load. mypy-list

akhilman commented 4 years ago

Same with LanguageClient-neovim:

WARNING - pyls.config.config - Failed to load pyls entry point 'pyls_mypy': No module named 'future'
Davidbrcz commented 4 years ago

Just run pip install --user future

karlicoss commented 3 years ago

Can confirm, fix by installing future helps. Seems that it was fixed here https://github.com/tomv564/pyls-mypy/pull/38, but it's not been published to pypi yet