From c523a47ecaf325deb5fc297907ca8943d9b3168f Mon Sep 17 00:00:00 2001 From: Oshgnacknak Date: Thu, 31 Jul 2025 18:39:46 +0200 Subject: [PATCH] nvim: Fix dap layout --- _config/nvim/plugin/dap.lua | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/_config/nvim/plugin/dap.lua b/_config/nvim/plugin/dap.lua index 50402cd..2cf7cd1 100644 --- a/_config/nvim/plugin/dap.lua +++ b/_config/nvim/plugin/dap.lua @@ -1,7 +1,27 @@ local dap = require("dap") 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 = { type = 'server', @@ -23,7 +43,6 @@ dap.configurations.rust = { end, cwd = "${workspaceFolder}", stopOnEntry = false, - -- runInTerminal = true, initCommands = { "gdb-remote localhost:1234", @@ -66,3 +85,10 @@ end -- dap.listeners.before.event_exited.dapui_config = function() -- dapui.close() -- end + +vim.api.nvim_create_autocmd("BufWritePost", { + pattern = "dapui-repl-*", + callback = function() + vim.cmd("AnsiEsc") + end, +})