nvim: Fix dap layout
This commit is contained in:
parent
acd8a470fb
commit
c523a47eca
1 changed files with 28 additions and 2 deletions
|
@ -1,7 +1,27 @@
|
||||||
local dap = require("dap")
|
local dap = require("dap")
|
||||||
local dapui = require("dapui")
|
local dapui = require("dapui")
|
||||||
|
|
||||||
dapui.setup({})
|
dapui.setup({
|
||||||
|
layouts = {
|
||||||
|
{
|
||||||
|
position = "left",
|
||||||
|
size = 0.3,
|
||||||
|
elements = {
|
||||||
|
{ id = "scopes", size = 0.25 },
|
||||||
|
"stacks",
|
||||||
|
"watches",
|
||||||
|
"breakpoints",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
position = "bottom",
|
||||||
|
size = 20,
|
||||||
|
elements = {
|
||||||
|
"repl",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
dap.adapters.lldb = {
|
dap.adapters.lldb = {
|
||||||
type = 'server',
|
type = 'server',
|
||||||
|
@ -23,7 +43,6 @@ dap.configurations.rust = {
|
||||||
end,
|
end,
|
||||||
cwd = "${workspaceFolder}",
|
cwd = "${workspaceFolder}",
|
||||||
stopOnEntry = false,
|
stopOnEntry = false,
|
||||||
-- runInTerminal = true,
|
|
||||||
|
|
||||||
initCommands = {
|
initCommands = {
|
||||||
"gdb-remote localhost:1234",
|
"gdb-remote localhost:1234",
|
||||||
|
@ -66,3 +85,10 @@ end
|
||||||
-- dap.listeners.before.event_exited.dapui_config = function()
|
-- dap.listeners.before.event_exited.dapui_config = function()
|
||||||
-- dapui.close()
|
-- dapui.close()
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = "dapui-repl-*",
|
||||||
|
callback = function()
|
||||||
|
vim.cmd("AnsiEsc")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue