dap/dapui updates

master
blob42 8 months ago
parent 1eaccc7888
commit a7ccbaa4fb

@ -14,7 +14,7 @@ local opts = {
}, },
-- Expand lines larger than the window -- Expand lines larger than the window
-- Requires >= 0.7 -- Requires >= 0.7
expand_lines = vim.fn.has("nvim-0.7") == 1, expand_lines = true,
-- Layouts define sections of the screen to place windows. -- Layouts define sections of the screen to place windows.
-- The position can be "left", "right", "top" or "bottom". -- The position can be "left", "right", "top" or "bottom".
-- The size specifies the height/width depending on position. It can be an Int -- The size specifies the height/width depending on position. It can be an Int
@ -26,9 +26,9 @@ local opts = {
{ {
elements = { elements = {
-- Elements can be strings or table with id and size keys. -- Elements can be strings or table with id and size keys.
{ id = "scopes", size = 0.25 }, { id = "scopes", size = 0.5 },
"breakpoints", { id = "breakpoints", size = 0.25 },
"stacks", { id = "stacks", size = 0.25 },
-- "watches", -- "watches",
}, },
size = 40, -- 40 columns size = 40, -- 40 columns
@ -36,17 +36,19 @@ local opts = {
}, },
{ {
elements = { elements = {
"repl", { id = "repl", size = 0.7 },
"watches" { id = "watches", size = 0.5 },
-- "console", -- "console",
}, },
size = 0.25, -- 25% of total lines size = 10, -- 25% of total lines
position = "bottom", position = "bottom",
}, },
}, },
-- where to display controls
controls = { controls = {
-- Requires Neovim nightly (or 0.8 when released) -- Requires Neovim nightly (or 0.8 when released)
enabled = true, enabled = true,
-- Display controls in this element -- Display controls in this element
element = "repl", element = "repl",
icons = { icons = {
@ -61,14 +63,11 @@ local opts = {
}, },
}, },
floating = { floating = {
max_height = nil, -- These can be integers or a float between 0 and 1.
max_width = nil, -- Floats will be treated as percentage of your screen.
border = "single", -- Border style. Can be "single", "double" or "rounded" border = "single", -- Border style. Can be "single", "double" or "rounded"
mappings = { mappings = {
close = { "q", "<Esc>" }, close = { "q", "<Esc>" },
}, },
}, },
windows = { indent = 1 },
render = { render = {
max_type_length = nil, -- Can be integer or nil. max_type_length = nil, -- Can be integer or nil.
max_value_lines = 100, -- Can be integer or nil. max_value_lines = 100, -- Can be integer or nil.
@ -80,5 +79,7 @@ M.setup = function()
dapui.setup(opts) dapui.setup(opts)
end end
M.opts = opts
return M return M

@ -3,6 +3,8 @@ if not ok then
vim.notify("missing module null-ls", vim.log.levels.WARN) vim.notify("missing module null-ls", vim.log.levels.WARN)
end end
local dapui_cfg = require("custom.plugins.configs.dapui").opts
local M = {} local M = {}
local config = { local config = {
@ -16,7 +18,7 @@ local config = {
lsp_codelens = false, -- use navigator lsp_codelens = false, -- use navigator
textobjects = true, textobjects = true,
dap_debug_keymap = false, dap_debug_keymap = false,
-- dap_debug_gui = false, dap_debug_gui = dapui_cfg,
-- dap_debug_vt = false, -- dap_debug_vt = false,
log_path = vim.fn.stdpath('cache') .. '/gonvim.log', log_path = vim.fn.stdpath('cache') .. '/gonvim.log',
lsp_inlay_hints = { lsp_inlay_hints = {

@ -47,7 +47,7 @@ local config = {
end, end,
desc = '[dap] step out' desc = '[dap] step out'
}, },
r = { R = {
rhs = function() rhs = function()
require('dap').run_last() require('dap').run_last()
end, end,

@ -47,6 +47,11 @@ local function register_listeners()
dapmode.stop() dapmode.stop()
dapui.close() dapui.close()
end end
dap.listeners.after['event_exited']['blob42-dap'] = function(_, _)
-- print("dap session ended")
dapmode.stop()
dapui.close()
end
end end
function M.go_debug() function M.go_debug()

Loading…
Cancel
Save