Skip to content

Commit

Permalink
feat: option to enable earial in diff windows (#355)
Browse files Browse the repository at this point in the history
resolves #354

Co-authored-by: Linus Boehm <linusboehm@gmail.com>
  • Loading branch information
linusboehm and Linus Boehm committed Mar 24, 2024
1 parent 993142d commit bdc94c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lua/aerial/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {},

Expand Down
4 changes: 2 additions & 2 deletions lua/aerial/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bdc94c5

Please sign in to comment.