From 34cb28d6991ef39231a066a9004b8ab877974d46 Mon Sep 17 00:00:00 2001 From: Alvaro-Kothe Date: Sat, 5 Apr 2025 11:05:16 -0300 Subject: [PATCH] fix: make textwrap customizable inside neogit buffers --- lua/neogit/lib/buffer.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/neogit/lib/buffer.lua b/lua/neogit/lib/buffer.lua index fbe2d9311..e81644aba 100644 --- a/lua/neogit/lib/buffer.lua +++ b/lua/neogit/lib/buffer.lua @@ -711,6 +711,8 @@ function Buffer.create(config) buffer:set_buffer_option("buftype", config.buftype or "nofile") end + buffer:set_window_option("wrap", false) + if config.filetype then logger.debug("[BUFFER:" .. buffer.handle .. "] Setting filetype: " .. config.filetype) buffer:set_filetype(config.filetype) @@ -783,7 +785,6 @@ function Buffer.create(config) end buffer:set_window_option("spell", config.spell_check or false) - buffer:set_window_option("wrap", false) buffer:set_window_option("foldmethod", "manual") -- TODO: Need to find a way to turn this off properly when unloading plugin -- buffer:set_window_option("winfixbuf", true)