fix: man pages shouldn't be ignored by default

This commit is contained in:
WieeRd 2023-03-24 15:20:30 +09:00
parent ab85d57942
commit ba60a0b1f5
2 changed files with 3 additions and 2 deletions

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