return { { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "ninja", "rst" } }, }, { "neovim/nvim-lspconfig", opts = { servers = { ruff = { cmd_env = { RUFF_TRACE = "messages" }, init_options = { settings = { logLevel = "error", }, }, keys = { { "co", rmz.lsp.action["source.organizeImports"], desc = "Organize Imports", }, }, }, }, setup = { ["ruff"] = function() rmz.lsp.on_attach(function(client, _) -- Disable hover in favor of Pyright client.server_capabilities.hoverProvider = false end, "ruff") end, }, }, }, { "nvim-neotest/neotest", dependencies = { "nvim-neotest/neotest-python", }, opts = { adapters = { ["neotest-python"] = { dap = { justMyCode = false }}, }, }, }, { "mfussenegger/nvim-dap", dependencies = { "mfussenegger/nvim-dap-python", keys = { { "dPt", function() require('dap-python').test_method() end, desc = "Debug Method", ft = "python" }, { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() local path = require("mason-registry").get_package("debugpy"):get_install_path() require("dap-python").setup(path .. "/venv/bin/python") end, }, }, { "jay-babu/mason-nvim-dap.nvim", opts = { handlers = { python = function() end, }, ensure_installed = { "python" }, }, }, { "linux-cultist/venv-selector.nvim", enabled = false, -- TODO needs fd to be installed (I don't know what that is) branch = "regexp", -- Use this branch for the new version cmd = "VenvSelect", opts = { settings = { options = { notify_user_on_venv_activation = true, }, }, }, -- Call config for python files and load the cached venv automatically ft = "python", keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, }, { "hrsh7th/nvim-cmp", optional = true, opts = function(_, opts) opts.auto_brackets = opts.auto_brackets or {} table.insert(opts.auto_brackets, "python") end, }, }