diff options
| author | pablu <me@pablu.de> | 2026-06-19 00:37:46 +0200 |
|---|---|---|
| committer | pablu <me@pablu.de> | 2026-06-19 00:37:46 +0200 |
| commit | 04d720f6c84d52445a0808fffae553b37408a4a2 (patch) | |
| tree | ab547ec14045b7d647f8ce03a718f3e6ee30764e /dot_config/nvim/lua/plugins/dap.lua | |
| parent | 9d0e106178a14651f5290dd742761167c353631e (diff) | |
only smart-nav on gentoo, and not on other systems, same with tmux navigation
Diffstat (limited to 'dot_config/nvim/lua/plugins/dap.lua')
| -rw-r--r-- | dot_config/nvim/lua/plugins/dap.lua | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/dot_config/nvim/lua/plugins/dap.lua b/dot_config/nvim/lua/plugins/dap.lua index 6d63dfa..1314be1 100644 --- a/dot_config/nvim/lua/plugins/dap.lua +++ b/dot_config/nvim/lua/plugins/dap.lua @@ -27,31 +27,29 @@ return { }) -- Configurations - dap.configurations = { - python = { - { - -- The first three options are required by nvim-dap - type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python` - request = "launch", - name = "Launch file", + dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = "python", -- the type here established the link to the adapter definition: `dap.adapters.python` + request = "launch", + name = "Launch file", - -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options - program = "${file}", -- This configuration will launch the current file if used. - pythonPath = function() - -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. - -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. - -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then - return cwd .. "/venv/bin/python" - elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then - return cwd .. "/.venv/bin/python" - else - return "/usr/bin/python" - end - end, - }, + program = "${file}", -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then + return cwd .. "/venv/bin/python" + elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then + return cwd .. "/.venv/bin/python" + else + return vim.fn.exepath("python") + end + end, }, } |
