mfussenegger / nvim-dap-python

An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.
GNU General Public License v3.0
539 stars 48 forks source link

Setup with lazyvim (incl django launcher) #105

Closed pirm-in closed 10 months ago

pirm-in commented 1 year ago

Hello there! I'm fairly new to neovim. I am using lazyvim, and i have configuration for nvim-dap-python like this

{
    "mfussenegger/nvim-dap-python",
    dependencies = { "mfussenegger/nvim-dap" },
    config = function(plugin, opts)
      require("dap-python").setup( vim.fn.getcwd() .. "/.venv/bin/python")
    end,
    opts = function(_, opts)
      table.insert(require("dap").configurations.python, {
        type = "python",
        request = "launch",
        name = "Django",
        program = vim.fn.getcwd() .. "/manage.py",
        args = { "runserver", "--noreload" },
      })
    end,
  },

Now this worked until recently. I am not quite sure what exactly changed, but i am now getting an error message.

bad argument #1 to 'insert' (table expected, got nil)

Not sure if this is a plain lazy issue, but since there is already #97 i figured it might be good to find a working solution here.

edit: the above is working. i forgot that i had removed debugpy. After installing it, it works again.