|
|
- local dap, dapui = require("dap"), require("dapui")
-
- -- Set breakpoint icon
- vim.fn.sign_define('DapBreakpoint', {text='', texthl='red', linehl='red', numhl='red'})
-
- -- Bind nvim-dap-ui to dap events
- dap.listeners.after.event_initialized["dapui_config"] = function()
- dapui.open()
- end
- dap.listeners.before.event_terminated["dapui_config"] = function()
- dapui.close()
- end
- dap.listeners.before.event_exited["dapui_config"] = function()
- dapui.close()
- end
-
- -- Python
- dap.adapters.python = {
- type = 'executable';
- command = 'python';
- args = { '-m', 'debugpy.adapter' };
- }
-
- dap.configurations.python = {
- {
- type = 'python';
- request = 'launch';
- name = "Launch file";
- program = "${file}";
- pythonPath = function()
- return '/usr/bin/python'
- end;
- },
- }
-
- dap.adapters.bashdb = {
- type = 'executable';
- command = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/bash-debug-adapter';
- name = 'bashdb';
- }
-
- dap.configurations.sh = {
- {
- type = 'bashdb';
- request = 'launch';
- name = "Launch file";
- showDebugOutput = true;
- pathBashdb = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb';
- pathBashdbLib = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir';
- trace = true;
- file = "${file}";
- program = "${file}";
- cwd = '${workspaceFolder}';
- pathCat = "cat";
- pathBash = "/bin/bash";
- pathMkfifo = "mkfifo";
- pathPkill = "pkill";
- args = {};
- env = {};
- terminalKind = "integrated";
- }
- }
|