linux-cultist / venv-selector.nvim

Allows selection of python virtual environment from within neovim
MIT License
444 stars 46 forks source link

Add PyLSP support, introduce hooks system #13

Closed mpaliwoda closed 1 year ago

mpaliwoda commented 1 year ago

Hey, I've tried adding PyLSP support to the plugin - here's my attempt 🙈

Summary of changes:

hope this fits into the plugin philosophy 😄

Let me know if you have any questions or see any concerns with the PR :)

edit: also if everything looks ok I'll try adding support for null-ls linters and formatters and possibly more type annotations if it would help maintenance ;)

linux-cultist commented 1 year ago

That's just awesome, I will have a look this weekend. :) There is another PR also that will add better Poetry support and caching of file listing's per working directory, so looks like the plugin will get a lot of new stuff this weekend. :)

linux-cultist commented 1 year ago

I guess we can merge this one then if you feel ready? There is another PR in the pipeline also, and I was thinking it would be good if we get this one in first, and then merge the other one tomorrow. Hopefully without too many conflicts... :)

And if I understand things correctly, we can update the README and say that the plugin now also supports PyLSP! Should we write a section in the README about any special requirements? Im not familar with PyLSP, is it always configured with Jedi for example? If a user doesnt have Jedi, what happens?

mpaliwoda commented 1 year ago

I've exposed the hooks to the user since they can be configured via setup function and updated README, feel free to merge if you don't have any other concerns :)

edit: as for jedi, I believe it's an integral part of pylsp so I don't think someone cannot have it installed and use pylsp at the same time :D

linux-cultist commented 1 year ago

Thank you, sounds very good :) I will merge tomorrow, the evening ran away a bit here... But tomorrow will be good, I have time to merge this and see how we get the other PR integrated as well. Have a good evening!

linux-cultist commented 1 year ago

Thank you very much for this PR, feels great to have your code in main now. :)