Merge pull request #230 from WieeRd/master

fix: aerial shouldn't be disabled by default in the man pages
This commit is contained in:
Steven Arcangeli 2023-03-24 08:25:59 -07:00 committed by GitHub
commit 9ee71844b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View file

@ -322,7 +322,7 @@ require("aerial").setup({
-- Ignored buftypes.
-- Can be one of the following:
-- false or nil - No buftypes are ignored.
-- "special" - All buffers other than normal and help buffers are ignored.
-- "special" - All buffers other than normal, help and man page buffers are ignored.
-- table - A list of buftypes to ignore. See :help buftype for the
-- possible values.
-- function - A function that returns true if the buffer should be

View file

@ -160,7 +160,7 @@ OPTIONS *aerial-option
-- Ignored buftypes.
-- Can be one of the following:
-- false or nil - No buftypes are ignored.
-- "special" - All buffers other than normal and help buffers are ignored.
-- "special" - All buffers other than normal, help and man page buffers are ignored.
-- table - A list of buftypes to ignore. See :help buftype for the
-- possible values.
-- function - A function that returns true if the buffer should be

View file

@ -146,7 +146,7 @@ local default_options = {
-- Ignored buftypes.
-- Can be one of the following:
-- false or nil - No buftypes are ignored.
-- "special" - All buffers other than normal and help buffers are ignored.
-- "special" - All buffers other than normal, help and man page buffers are ignored.
-- table - A list of buftypes to ignore. See :help buftype for the
-- possible values.
-- function - A function that returns true if the buffer should be

View file

@ -240,8 +240,9 @@ M.is_ignored_buf = function(bufnr)
end
if ignore.buftypes then
local buftype = vim.api.nvim_buf_get_option(bufnr, "buftype")
local filetype = vim.api.nvim_buf_get_option(bufnr, "filetype")
if ignore.buftypes == "special" then
if buftype ~= "" and buftype ~= "help" then
if buftype ~= "" and buftype ~= "help" and filetype ~= "man" then
return true, string.format("Buftype '%s' is \"special\"", buftype)
end
elseif type(ignore.buftypes) == "table" then