diff options
author | Matthew Lemon <y@yulqen.org> | 2023-05-14 09:10:26 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-05-14 09:10:26 +0100 |
commit | 0721b537a8aa3be8b70c183b25951494df9dcd0e (patch) | |
tree | eff07bbc31aeefbb9d2e441bb5ca8b5a5a527ffb /nvim-primeagen/after/plugin/dap.lua | |
parent | 10a89dfbc6bc57ce12c8cf90f1b38a34b728b369 (diff) |
Installs nvim config base-idea
Diffstat (limited to 'nvim-primeagen/after/plugin/dap.lua')
-rw-r--r-- | nvim-primeagen/after/plugin/dap.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nvim-primeagen/after/plugin/dap.lua b/nvim-primeagen/after/plugin/dap.lua new file mode 100644 index 0000000..495445f --- /dev/null +++ b/nvim-primeagen/after/plugin/dap.lua @@ -0,0 +1,30 @@ +local dap = require('dap') +dap.adapters.python = { + type = 'executable'; + command = '.venv/bin/python'; + args = { '-m', 'debugpy.adapter' }; +} + +vim.keymap.set('n', '<F5>', function() require('dap').continue() end) +vim.keymap.set('n', '<F10>', function() require('dap').step_over() end) +vim.keymap.set('n', '<F11>', function() require('dap').step_into() end) +vim.keymap.set('n', '<F12>', function() require('dap').step_out() end) +vim.keymap.set('n', '<F9>', function() require('dap').toggle_breakpoint() end) +vim.keymap.set('n', '<Leader>B', function() require('dap').set_breakpoint() end) +vim.keymap.set('n', '<Leader>lp', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end) +vim.keymap.set('n', '<Leader>dr', function() require('dap').repl.open() end) +vim.keymap.set('n', '<Leader>dl', function() require('dap').run_last() end) +vim.keymap.set({'n', 'v'}, '<Leader>dh', function() + require('dap.ui.widgets').hover() +end) +vim.keymap.set({'n', 'v'}, '<Leader>dp', function() + require('dap.ui.widgets').preview() +end) +vim.keymap.set('n', '<Leader>df', function() + local widgets = require('dap.ui.widgets') + widgets.centered_float(widgets.frames) +end) +vim.keymap.set('n', '<Leader>ds', function() + local widgets = require('dap.ui.widgets') + widgets.centered_float(widgets.scopes) +end) |