diff --git a/lua/languages/dap.lua b/lua/languages/dap.lua index 9b2a0d5..224ce6e 100644 --- a/lua/languages/dap.lua +++ b/lua/languages/dap.lua @@ -1,68 +1,68 @@ return { - { - "mfussenegger/nvim-dap", - config = function() - local dap = require("dap") + { + "mfussenegger/nvim-dap", + config = function() + local dap = require("dap") - -- Signs - vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DapBreakpoint" }) - vim.fn.sign_define("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition" }) - vim.fn.sign_define("DapLogPoint", { text = "◆", texthl = "DapLogPoint" }) + -- Signs + vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DapBreakpoint" }) + vim.fn.sign_define("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition" }) + vim.fn.sign_define("DapLogPoint", { text = "◆", texthl = "DapLogPoint" }) - -- Keymaps - local map = vim.keymap.set - local function with_opts(desc) - return vim.tbl_extend("force", { silent = true }, { desc = desc }) - end + -- Keymaps + local map = vim.keymap.set + local function with_opts(desc) + return vim.tbl_extend("force", { silent = true }, { desc = desc }) + end - map("n", "db", ":DapToggleBreakpoint", with_opts("Toggle Breakpoint")) - map("n", "dc", "DapContinue", with_opts("Continue")) - map( - "n", - "da", - "lua require('dap').continue({ before = get_args })", - with_opts("Run with Args") - ) - map("n", "dC", "lua require('dap').run_to_cursor()", with_opts("Run to Cursor")) - map("n", "dg", "lua require('dap').goto_()", with_opts("Go to Line (no execute)")) - map("n", "di", ":DapStepInto", with_opts("Step Into")) - map("n", "dj", "lua require('dap').down()", with_opts("Down")) - map("n", "dk", "lua require('dap').up()", with_opts("Up")) - map("n", "dl", "lua require('dap').run_last()", with_opts("Run Last")) - map("n", "do", ":DapStepOut", with_opts("Step Out")) - map("n", "dO", ":DapStepOver", with_opts("Step Over")) - map("n", "dp", "lua require('dap').pause()", with_opts("Pause")) - map("n", "dr", ":DapToggleRepl", with_opts("Toggle REPL")) - map("n", "ds", "lua require('dap').session()", with_opts("Session")) - map("n", "dt", ":DapTerminate", with_opts("Terminate")) - map("n", "du", "lua require('dapui').toggle()", with_opts("Dap UI")) - map({ "n", "v" }, "de", "lua require('dapui').eval()", with_opts("Eval")) - end, - }, - { - "rcarriga/nvim-dap-ui", - dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, - config = function() - require("dapui").setup({ - floating = { - mappings = { - close = { "", "q" }, - }, - }, - }) - end, - }, - { - "theHamsta/nvim-dap-virtual-text", - dependencies = { "mfussenegger/nvim-dap" }, - config = true, - }, - { - "mfussenegger/nvim-dap-python", - ft = "python", - dependencies = { "mfussenegger/nvim-dap" }, - config = function() - require("dap-python").setup("~/.virtualenvs/debugpy/bin/python") - end, - }, + map("n", "db", ":DapToggleBreakpoint", with_opts("Toggle Breakpoint")) + map("n", "dc", "DapContinue", with_opts("Continue")) + map( + "n", + "da", + "lua require('dap').continue({ before = get_args })", + with_opts("Run with Args") + ) + map("n", "dC", "lua require('dap').run_to_cursor()", with_opts("Run to Cursor")) + map("n", "dg", "lua require('dap').goto_()", with_opts("Go to Line (no execute)")) + map("n", "di", ":DapStepInto", with_opts("Step Into")) + map("n", "dj", "lua require('dap').down()", with_opts("Down")) + map("n", "dk", "lua require('dap').up()", with_opts("Up")) + map("n", "dl", "lua require('dap').run_last()", with_opts("Run Last")) + map("n", "do", ":DapStepOut", with_opts("Step Out")) + map("n", "dO", ":DapStepOver", with_opts("Step Over")) + map("n", "dp", "lua require('dap').pause()", with_opts("Pause")) + map("n", "dr", ":DapToggleRepl", with_opts("Toggle REPL")) + map("n", "ds", "lua require('dap').session()", with_opts("Session")) + map("n", "dt", ":DapTerminate", with_opts("Terminate")) + map("n", "du", "lua require('dapui').toggle()", with_opts("Dap UI")) + map({ "n", "v" }, "de", "lua require('dapui').eval()", with_opts("Eval")) + end, + }, + { + "rcarriga/nvim-dap-ui", + dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, + config = function() + require("dapui").setup({ + floating = { + mappings = { + close = { "", "q" }, + }, + }, + }) + end, + }, + { + "theHamsta/nvim-dap-virtual-text", + dependencies = { "mfussenegger/nvim-dap" }, + config = true, + }, + { + "mfussenegger/nvim-dap-python", + ft = "python", + dependencies = { "mfussenegger/nvim-dap" }, + config = function() + require("dap-python").setup("~/.virtualenvs/debugpy/bin/python") + end, + }, }