Hi,
When working in Diffview I would like to be able to resize / enable auto resizing of the differents windows (diff files) except the Diffview panel.
Actually when I open Diffview, all the cmd (like FocusEnable FocusAutoresize or FocusMaximise) are not working.
How can I proceed so the Diffview panel is not resized but the diff files are ?
Actual config :
{
"nvim-focus/focus.nvim",
event = "VeryLazy",
opts = {
enable = true,
commands = true,
split = {
bufnew = false,
tmux = false,
},
autoresize = {
enable = true,
width = 0,
height = 0,
minwidth = 0,
minheight = 0,
height_quickfix = 10,
},
ui = {
number = false,
relativenumber = false,
hybridnumber = false,
absolutenumber_unfocussed = false,
cursorline = false,
cursorcolumn = false,
colorcolumn = {
enable = false,
},
signcolumn = false,
winhighlight = false,
},
},
}
Autocmds related :
{
"WinEnter",
function()
local ignore_buftypes = { "nofile", "prompt", "popup" }
if vim.tbl_contains(ignore_buftypes, vim.bo.buftype) then
vim.b.focus_disable = true
end
end,
description = "Disable focus autoresize for BufType",
},
{
"FileType",
function()
local ignore_filetypes = {
["neo-tree"] = true,
["dap-repl"] = true,
SidebarNvim = true,
Trouble = true,
terminal = true,
dapui_console = true,
dapui_watches = true,
dapui_stacks = true,
dapui_breakpoints = true,
dapui_scopes = true,
OverseerList = true,
noice = true,
DiffviewFiles = true,
}
vim.b.focus_disable = ignore_filetypes[vim.bo.filetype]
end,
description = "Disable focus autoresize for FileType",
},
Hi,
When working in Diffview I would like to be able to resize / enable auto resizing of the differents windows (diff files) except the
Diffviewpanel.Actually when I open
Diffview, all thecmd(likeFocusEnableFocusAutoresizeorFocusMaximise) are not working.How can I proceed so the
Diffviewpanel is not resized but the diff files are ?Actual config :
{ "nvim-focus/focus.nvim", event = "VeryLazy", opts = { enable = true, commands = true, split = { bufnew = false, tmux = false, }, autoresize = { enable = true, width = 0, height = 0, minwidth = 0, minheight = 0, height_quickfix = 10, }, ui = { number = false, relativenumber = false, hybridnumber = false, absolutenumber_unfocussed = false, cursorline = false, cursorcolumn = false, colorcolumn = { enable = false, }, signcolumn = false, winhighlight = false, }, }, }Autocmds related :
{ "WinEnter", function() local ignore_buftypes = { "nofile", "prompt", "popup" } if vim.tbl_contains(ignore_buftypes, vim.bo.buftype) then vim.b.focus_disable = true end end, description = "Disable focus autoresize for BufType", }, { "FileType", function() local ignore_filetypes = { ["neo-tree"] = true, ["dap-repl"] = true, SidebarNvim = true, Trouble = true, terminal = true, dapui_console = true, dapui_watches = true, dapui_stacks = true, dapui_breakpoints = true, dapui_scopes = true, OverseerList = true, noice = true, DiffviewFiles = true, } vim.b.focus_disable = ignore_filetypes[vim.bo.filetype] end, description = "Disable focus autoresize for FileType", },