From c80a54e42b52ce297f0f2f71af23c562832025c7 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:35:27 +0900 Subject: init --- .../TheSiahxyz/lua/thesiahxyz/plugins/python.lua | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/python.lua (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/python.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/python.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/python.lua new file mode 100644 index 0000000..3e53ddb --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/python.lua @@ -0,0 +1,59 @@ +return { + -- { + -- "bps/vim-textobj-python", + -- dependencies = { "kana/vim-textobj-user" }, + -- }, + { + "nvim-neotest/neotest", + optional = true, + dependencies = { + "nvim-neotest/neotest-python", + }, + opts = { + adapters = { + ["neotest-python"] = { + -- Here you can specify the settings for the adapter, i.e. + -- runner = "pytest", + -- python = ".venv/bin/python", + }, + }, + }, + }, + { + "linux-cultist/venv-selector.nvim", + dependencies = { + "neovim/nvim-lspconfig", + "mfussenegger/nvim-dap", + "mfussenegger/nvim-dap-python", --optional + { "nvim-telescope/telescope.nvim", branch = "0.1.x", dependencies = { "nvim-lua/plenary.nvim" } }, + }, + lazy = false, + branch = "regexp", -- This is the regexp branch, use this for the new version + ft = "python", + init = function() + local wk = require("which-key") + wk.add({ + mode = { "n", "v" }, + { "v", group = "Virtual envs" }, + }) + end, + config = function() + require("venv-selector").setup({ + settings = { + options = { + notify_user_on_venv_activation = true, + }, + search = { + venvs = { + command = "fd /bin/python$ ~/.local/share/venvs --full-path", + }, + }, + }, + }) + end, + keys = { + { "vs", "VenvSelect", desc = "Select virtual env", ft = "python" }, + { "vc", "VenvSelectCached", desc = "Select venv (cache)", ft = "python" }, + }, + }, +} -- cgit v1.2.3