plugins: add venv-selector

- Adds `venv-selector` to ease the setting of the needed virtual
  environment for python.
- Adds pyright as a python LSP server.

Co-Authored-by: iGor milhit <igor@milhit.ch>
main
iGor milhit 2024-03-13 10:04:24 +01:00
parent 2959893e49
commit b17723a4b5
Signed by: igor
GPG Key ID: 692D97C3D0228A99
2 changed files with 17 additions and 1 deletions

View File

@ -458,7 +458,7 @@ end
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
pyright = {},
-- rust_analyzer = {},
-- tsserver = {},

View File

@ -0,0 +1,16 @@
return {
'linux-cultist/venv-selector.nvim',
dependencies = { 'neovim/nvim-lspconfig', 'nvim-telescope/telescope.nvim', 'mfussenegger/nvim-dap-python' },
opts = {
-- Your options go here
-- name = "venv",
-- auto_refresh = false
},
event = 'VeryLazy', -- Optional: needed only if you want to type `:VenvSelect` without a keymapping
keys = {
-- Keymap to open VenvSelector to pick a venv.
{ '<leader>vs', '<cmd>VenvSelect<cr>' },
-- Keymap to retrieve the venv from a cache (the one previously used for the same project directory).
{ '<leader>vc', '<cmd>VenvSelectCached<cr>' },
},
}