feat: option to enable earial in diff windows (#355)

resolves #354

Co-authored-by: Linus Boehm <linusboehm@gmail.com>
This commit is contained in:
Linus Boehm 2024-03-23 23:10:54 -04:00 committed by GitHub
parent 993142d492
commit bdc94c5387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -146,6 +146,9 @@ local default_options = {
-- Ignore unlisted buffers. See :help buflisted
unlisted_buffers = false,
-- Ignore diff windows (setting to false will allow aerial in diff windows)
diff_windows = true,
-- List of filetypes to ignore.
filetypes = {},

View file

@ -275,10 +275,10 @@ M.is_ignored_win = function(winid)
if ignore_buf then
return ignore_buf, message
end
if vim.wo[winid].diff then
local ignore = config.ignore
if ignore.diff_windows and vim.wo[winid].diff then
return true, "Viewing a diff"
end
local ignore = config.ignore
if ignore.wintypes then
local wintype = vim.fn.win_gettype(winid)
if ignore.wintypes == "special" and wintype ~= "" then