summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins/pytest.lua
blob: 20e246e1e74c5e87cab0d70c7510a3803e42c763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
  }
}