mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
d85584d09f
* Make autopairs config consistent with others * Fix two typos for autopairs * Remove extranous autopairs code. Return on setup * Remove extranous else for autopairs completion confirmation * Move on_config_done callbacks to setup functions. * Add on_config_done completion for builtins lacking a config function * enables galaxyline callbacks to work properly * Add modules for more builtins * Finish streamline of config function in plugin setup * Fix double use of which_key/wk * Fix erroneous remove of functionality in autopairs completion * consistency fixes * Work around telescope not found at config time * Match plugin definition of project and lualine with others * fix: restore config callback syntax Co-authored-by: Johan Melin <johan.melin@paradoxinteractive.com> Co-authored-by: rebuilt <memoryman51@hotmail.com> Co-authored-by: Luc Sinet <luc.sinet@gmail.com> Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
61 lines
1.8 KiB
Lua
61 lines
1.8 KiB
Lua
local M = {}
|
|
|
|
M.config = function()
|
|
lvim.builtin.dap = {
|
|
active = false,
|
|
on_config_done = nil,
|
|
breakpoint = {
|
|
text = "",
|
|
texthl = "LspDiagnosticsSignError",
|
|
linehl = "",
|
|
numhl = "",
|
|
},
|
|
}
|
|
end
|
|
|
|
M.setup = function()
|
|
local dap = require "dap"
|
|
|
|
vim.fn.sign_define("DapBreakpoint", lvim.builtin.dap.breakpoint)
|
|
dap.defaults.fallback.terminal_win_cmd = "50vsplit new"
|
|
|
|
lvim.builtin.which_key.mappings["d"] = {
|
|
name = "Debug",
|
|
t = { "<cmd>lua require'dap'.toggle_breakpoint()<cr>", "Toggle Breakpoint" },
|
|
b = { "<cmd>lua require'dap'.step_back()<cr>", "Step Back" },
|
|
c = { "<cmd>lua require'dap'.continue()<cr>", "Continue" },
|
|
C = { "<cmd>lua require'dap'.run_to_cursor()<cr>", "Run To Cursor" },
|
|
d = { "<cmd>lua require'dap'.disconnect()<cr>", "Disconnect" },
|
|
g = { "<cmd>lua require'dap'.session()<cr>", "Get Session" },
|
|
i = { "<cmd>lua require'dap'.step_into()<cr>", "Step Into" },
|
|
o = { "<cmd>lua require'dap'.step_over()<cr>", "Step Over" },
|
|
u = { "<cmd>lua require'dap'.step_out()<cr>", "Step Out" },
|
|
p = { "<cmd>lua require'dap'.pause.toggle()<cr>", "Pause" },
|
|
r = { "<cmd>lua require'dap'.repl.toggle()<cr>", "Toggle Repl" },
|
|
s = { "<cmd>lua require'dap'.continue()<cr>", "Start" },
|
|
q = { "<cmd>lua require'dap'.close()<cr>", "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
|