diff options
Diffstat (limited to '.config/nvim/lua/dap_conf.lua')
-rw-r--r-- | .config/nvim/lua/dap_conf.lua | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/.config/nvim/lua/dap_conf.lua b/.config/nvim/lua/dap_conf.lua deleted file mode 100644 index b3cee89..0000000 --- a/.config/nvim/lua/dap_conf.lua +++ /dev/null @@ -1,52 +0,0 @@ -local dap, dapui = require('dap'), require('dapui') -local dapgo = require('dap-go') -dapui.setup() -dapgo.setup() -dap.listeners.before.attach.dapui_config = function() - dapui.open() -end -dap.listeners.before.launch.dapui_config = function() - dapui.open() -end - -dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "--interpreter=dap", "--eval-command", "set print pretty on" } -} - -local configurations = {'c', 'cpp', 'rust'} - -for _, conf in ipairs(configurations) do - dap.configurations[conf] = { - { - name = "Launch", - type = "gdb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = "${workspaceFolder}", - stopAtBeginningOfMainSubprogram = false, - }, - } -end - --- Include the next few lines until the comment only if you feel you need it -dap.listeners.before.event_terminated.dapui_config = function() - dapui.close() -end -dap.listeners.before.event_exited.dapui_config = function() - dapui.close() -end --- Include everything after this - - -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', '<C-K>', function() require('dap').toggle_breakpoint() end) -vim.api.nvim_create_user_command('DapRepeat',function() require('dap').run_last() end, {}) -vim.api.nvim_create_user_command('DapOpen',function() dapui.open() end, {}) -vim.api.nvim_create_user_command('DapClose',function() dapui.close() end, {}) |