mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
fix: add dap-ui config to lvim.builtin.dap (#3386)
This commit is contained in:
parent
43a6ebbf5a
commit
fb7385fd8a
1 changed files with 42 additions and 41 deletions
|
@ -24,6 +24,47 @@ M.config = function()
|
||||||
},
|
},
|
||||||
ui = {
|
ui = {
|
||||||
auto_open = true,
|
auto_open = true,
|
||||||
|
config = {
|
||||||
|
expand_lines = true,
|
||||||
|
icons = { expanded = "", collapsed = "", circular = "" },
|
||||||
|
mappings = {
|
||||||
|
-- Use a table to apply multiple mappings
|
||||||
|
expand = { "<CR>", "<2-LeftMouse>" },
|
||||||
|
open = "o",
|
||||||
|
remove = "d",
|
||||||
|
edit = "e",
|
||||||
|
repl = "r",
|
||||||
|
toggle = "t",
|
||||||
|
},
|
||||||
|
layouts = {
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
{ id = "scopes", size = 0.33 },
|
||||||
|
{ id = "breakpoints", size = 0.17 },
|
||||||
|
{ id = "stacks", size = 0.25 },
|
||||||
|
{ id = "watches", size = 0.25 },
|
||||||
|
},
|
||||||
|
size = 0.33,
|
||||||
|
position = "right",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
{ id = "repl", size = 0.45 },
|
||||||
|
{ id = "console", size = 0.55 },
|
||||||
|
},
|
||||||
|
size = 0.27,
|
||||||
|
position = "bottom",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
floating = {
|
||||||
|
max_height = 0.9,
|
||||||
|
max_width = 0.5, -- Floats will be treated as percentage of your screen.
|
||||||
|
border = vim.g.border_chars, -- Border style. Can be 'single', 'double' or 'rounded'
|
||||||
|
mappings = {
|
||||||
|
close = { "q", "<Esc>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -69,47 +110,7 @@ M.setup_ui = function()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local dapui = require "dapui"
|
local dapui = require "dapui"
|
||||||
dapui.setup {
|
dapui.setup(lvim.builtin.dap.ui.config)
|
||||||
expand_lines = true,
|
|
||||||
icons = { expanded = "", collapsed = "", circular = "" },
|
|
||||||
mappings = {
|
|
||||||
-- Use a table to apply multiple mappings
|
|
||||||
expand = { "<CR>", "<2-LeftMouse>" },
|
|
||||||
open = "o",
|
|
||||||
remove = "d",
|
|
||||||
edit = "e",
|
|
||||||
repl = "r",
|
|
||||||
toggle = "t",
|
|
||||||
},
|
|
||||||
layouts = {
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{ id = "scopes", size = 0.33 },
|
|
||||||
{ id = "breakpoints", size = 0.17 },
|
|
||||||
{ id = "stacks", size = 0.25 },
|
|
||||||
{ id = "watches", size = 0.25 },
|
|
||||||
},
|
|
||||||
size = 0.33,
|
|
||||||
position = "right",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{ id = "repl", size = 0.45 },
|
|
||||||
{ id = "console", size = 0.55 },
|
|
||||||
},
|
|
||||||
size = 0.27,
|
|
||||||
position = "bottom",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
floating = {
|
|
||||||
max_height = 0.9,
|
|
||||||
max_width = 0.5, -- Floats will be treated as percentage of your screen.
|
|
||||||
border = vim.g.border_chars, -- Border style. Can be 'single', 'double' or 'rounded'
|
|
||||||
mappings = {
|
|
||||||
close = { "q", "<Esc>" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
if lvim.builtin.dap.ui.auto_open then
|
if lvim.builtin.dap.ui.auto_open then
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
|
|
Loading…
Reference in a new issue