From 1f6643c7b23c5737c895a855723c50a4b94b0219 Mon Sep 17 00:00:00 2001 From: hnolan Date: Wed, 30 Apr 2025 14:04:25 -0400 Subject: [PATCH] Add config option for text wrapping in UI windows --- lua/dapui/config/init.lua | 2 ++ lua/dapui/windows/layout.lua | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/dapui/config/init.lua b/lua/dapui/config/init.lua index 73a1a51..f5d93b6 100644 --- a/lua/dapui/config/init.lua +++ b/lua/dapui/config/init.lua @@ -4,6 +4,7 @@ local dapui = {} ---@toc_entry Configuration Options ---@class dapui.Config +---@field wrap boolean Whether or not to wrap UI text ---@field icons dapui.Config.icons ---@field mappings table Keys to trigger actions in elements ---@field element_mappings table> Per-element overrides of global mappings @@ -77,6 +78,7 @@ local dapui = {} ---@type dapui.Config ---@nodoc local default_config = { + wrap = false, icons = { expanded = "", collapsed = "", current_frame = "" }, mappings = { -- Use a table to apply multiple mappings diff --git a/lua/dapui/windows/layout.lua b/lua/dapui/windows/layout.lua index b63da7d..de9efd9 100644 --- a/lua/dapui/windows/layout.lua +++ b/lua/dapui/windows/layout.lua @@ -171,13 +171,14 @@ function WindowLayout:toggle() end function WindowLayout:_init_win_settings(win) + local config = require("dapui.config") local win_settings = { list = false, relativenumber = false, number = false, winfixwidth = true, winfixheight = true, - wrap = false, + wrap = config.wrap, signcolumn = "auto", spell = false, }