mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
feat: option to enable earial in diff windows (#355)
resolves #354 Co-authored-by: Linus Boehm <linusboehm@gmail.com>
This commit is contained in:
parent
993142d492
commit
bdc94c5387
2 changed files with 5 additions and 2 deletions
|
@ -146,6 +146,9 @@ local default_options = {
|
||||||
-- Ignore unlisted buffers. See :help buflisted
|
-- Ignore unlisted buffers. See :help buflisted
|
||||||
unlisted_buffers = false,
|
unlisted_buffers = false,
|
||||||
|
|
||||||
|
-- Ignore diff windows (setting to false will allow aerial in diff windows)
|
||||||
|
diff_windows = true,
|
||||||
|
|
||||||
-- List of filetypes to ignore.
|
-- List of filetypes to ignore.
|
||||||
filetypes = {},
|
filetypes = {},
|
||||||
|
|
||||||
|
|
|
@ -275,10 +275,10 @@ M.is_ignored_win = function(winid)
|
||||||
if ignore_buf then
|
if ignore_buf then
|
||||||
return ignore_buf, message
|
return ignore_buf, message
|
||||||
end
|
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"
|
return true, "Viewing a diff"
|
||||||
end
|
end
|
||||||
local ignore = config.ignore
|
|
||||||
if ignore.wintypes then
|
if ignore.wintypes then
|
||||||
local wintype = vim.fn.win_gettype(winid)
|
local wintype = vim.fn.win_gettype(winid)
|
||||||
if ignore.wintypes == "special" and wintype ~= "" then
|
if ignore.wintypes == "special" and wintype ~= "" then
|
||||||
|
|
Loading…
Reference in a new issue