linux-cultist / venv-selector.nvim

Allows selection of python virtual environment from within neovim
MIT License
379 stars 40 forks source link

Enhance hooks and ensure compatibility with nightly build #99

Closed neolooong closed 4 months ago

neolooong commented 4 months ago

Summary of changes:

  1. Simplify pylsp hook and use workspace/didChangeConfiguration instead of the setup function in pylsp hook.
  2. pyright and pylance hook no longer work on neovim nightly due to https://github.com/neovim/neovim/commit/9f8c96240dc0318bd92a646966917e8fe0641144. (client.config.settings is readonly on neovim nightly)
  3. execut_for_clients and execute_for_client do the same thing. vim.lsp.get_active_clients({name="name"}) always return one client, even thought it attaches onto many buffer. So, there is no need to use vim.tbl_map.
linux-cultist commented 4 months ago

This looks excellent, I will have a look early next week. Managed to attract a cold this weekend... :/

linux-cultist commented 4 months ago

Lets get this merged. Seems to work nicely on my system and I couldnt see any regressions. :+1: