summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2025-07-11 21:53:37 +0100
committerMichaël Ball <michael.ball@krotosaudio.com>2025-07-11 21:53:37 +0100
commita83ac69c60710b835e71e45ce83bb187ae0e60c3 (patch)
tree051aac9a0f6ab5323088a583944c63e98ca330d6 /neovim/.config/nvim
parente720ec2e51448a8800aa904e58ca457a9cf30629 (diff)
Set up pytest
Diffstat (limited to 'neovim/.config/nvim')
-rw-r--r--neovim/.config/nvim/lua/plugins/nvim_dap.lua14
-rw-r--r--neovim/.config/nvim/lua/plugins/pytest.lua29
2 files changed, 29 insertions, 14 deletions
diff --git a/neovim/.config/nvim/lua/plugins/nvim_dap.lua b/neovim/.config/nvim/lua/plugins/nvim_dap.lua
index f94fd0f..e1daedb 100644
--- a/neovim/.config/nvim/lua/plugins/nvim_dap.lua
+++ b/neovim/.config/nvim/lua/plugins/nvim_dap.lua
@@ -5,12 +5,6 @@ return {
'mfussenegger/nvim-dap-python',
'rcarriga/nvim-dap-ui',
'nvim-neotest/nvim-nio',
- {
- 'nvim-neotest/neotest',
- dependencies = {
- 'nvim-neotest/neotest-python',
- }
- },
},
keys = {
{ "<leader>br", require('dap').toggle_breakpoint, "Toggle breakpoint" },
@@ -102,14 +96,6 @@ return {
})
require("dapui").setup()
-
- require("neotest").setup({
- adapters = {
- require("neotest-python")({
- dap = { django = true },
- }),
- }
- })
end,
},
}
diff --git a/neovim/.config/nvim/lua/plugins/pytest.lua b/neovim/.config/nvim/lua/plugins/pytest.lua
new file mode 100644
index 0000000..20e246e
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins/pytest.lua
@@ -0,0 +1,29 @@
+return {
+ {
+ "richardhapb/pytest.nvim",
+ dependencies = { "nvim-treesitter/nvim-treesitter" },
+ opts = {}, -- Define the options here
+ config = function(_, opts)
+ require('nvim-treesitter.configs').setup {
+ ensure_installed = { 'python', 'xml' },
+ docker = {
+ enabled = function()
+ return vim.fn.getcwd():match("docker-compose.dev.yml$")
+ end,
+ enable_docker_compose = function()
+ return vim.fn.getcwd():match("docker-compose.dev.yml$")
+ end,
+ docker_compose_file = "docker-compose.dev.yml",
+ },
+ django = {
+ enabled = function()
+ return vim.fn.getcwd():match("manage.py$")
+ end,
+ django_settings_module = "krotosstudio.settings",
+ },
+ }
+
+ require('pytest').setup(opts)
+ end
+ }
+}