From 3930bda0c177fe2499bda9080d39c375c74cdf90 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Wed, 13 Mar 2024 10:04:24 +0100 Subject: [PATCH] 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 --- init.lua | 2 +- lua/custom/plugins/venv-selector.lua | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/venv-selector.lua diff --git a/init.lua b/init.lua index 66ced86..4f02308 100644 --- a/init.lua +++ b/init.lua @@ -458,7 +458,7 @@ end local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- tsserver = {}, diff --git a/lua/custom/plugins/venv-selector.lua b/lua/custom/plugins/venv-selector.lua new file mode 100644 index 0000000..50d0458 --- /dev/null +++ b/lua/custom/plugins/venv-selector.lua @@ -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. + { 'vs', 'VenvSelect' }, + -- Keymap to retrieve the venv from a cache (the one previously used for the same project directory). + { 'vc', 'VenvSelectCached' }, + }, +}