From 52b74557415eb757ad4b7481b0aec8a3f98dd58d Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Sun, 10 Oct 2021 21:07:41 +0200 Subject: feat: add an independent lvim namespace (#1699) --- lua/core/dap.lua | 76 -------------------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 lua/core/dap.lua (limited to 'lua/core/dap.lua') diff --git a/lua/core/dap.lua b/lua/core/dap.lua deleted file mode 100644 index d9b59641..00000000 --- a/lua/core/dap.lua +++ /dev/null @@ -1,76 +0,0 @@ -local M = {} - -M.config = function() - lvim.builtin.dap = { - active = false, - on_config_done = nil, - breakpoint = { - text = "", - texthl = "LspDiagnosticsSignError", - linehl = "", - numhl = "", - }, - breakpoint_rejected = { - text = "", - texthl = "LspDiagnosticsSignHint", - linehl = "", - numhl = "", - }, - stopped = { - text = "", - texthl = "LspDiagnosticsSignInformation", - linehl = "DiagnosticUnderlineInfo", - numhl = "LspDiagnosticsSignInformation", - }, - } -end - -M.setup = function() - local dap = require "dap" - - vim.fn.sign_define("DapBreakpoint", lvim.builtin.dap.breakpoint) - vim.fn.sign_define("DapBreakpointRejected", lvim.builtin.dap.breakpoint_rejected) - vim.fn.sign_define("DapStopped", lvim.builtin.dap.stopped) - - dap.defaults.fallback.terminal_win_cmd = "50vsplit new" - - lvim.builtin.which_key.mappings["d"] = { - name = "Debug", - t = { "lua require'dap'.toggle_breakpoint()", "Toggle Breakpoint" }, - b = { "lua require'dap'.step_back()", "Step Back" }, - c = { "lua require'dap'.continue()", "Continue" }, - C = { "lua require'dap'.run_to_cursor()", "Run To Cursor" }, - d = { "lua require'dap'.disconnect()", "Disconnect" }, - g = { "lua require'dap'.session()", "Get Session" }, - i = { "lua require'dap'.step_into()", "Step Into" }, - o = { "lua require'dap'.step_over()", "Step Over" }, - u = { "lua require'dap'.step_out()", "Step Out" }, - p = { "lua require'dap'.pause.toggle()", "Pause" }, - r = { "lua require'dap'.repl.toggle()", "Toggle Repl" }, - s = { "lua require'dap'.continue()", "Start" }, - q = { "lua require'dap'.close()", "Quit" }, - } - - if lvim.builtin.dap.on_config_done then - lvim.builtin.dap.on_config_done(dap) - end -end - --- TODO put this up there ^^^ call in ftplugin - --- M.dap = function() --- if lvim.plugin.dap.active then --- local dap_install = require "dap-install" --- dap_install.config("python_dbg", {}) --- end --- end --- --- M.dap = function() --- -- gem install readapt ruby-debug-ide --- if lvim.plugin.dap.active then --- local dap_install = require "dap-install" --- dap_install.config("ruby_vsc_dbg", {}) --- end --- end - -return M -- cgit v1.2.3