fix: don't ignore help buftypes by default (#204)

This commit is contained in:
Steven Arcangeli 2023-01-06 08:26:54 -08:00
parent 17f97fd2ca
commit 7acdd616ee
2 changed files with 5 additions and 3 deletions

View file

@ -152,7 +152,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 buffers are ignored.
-- "special" - All buffers other than normal and help 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

@ -239,8 +239,10 @@ M.is_ignored_buf = function(bufnr)
end
if ignore.buftypes then
local buftype = vim.api.nvim_buf_get_option(bufnr, "buftype")
if ignore.buftypes == "special" and buftype ~= "" then
return true
if ignore.buftypes == "special" then
if buftype ~= "" and buftype ~= "help" then
return true
end
elseif type(ignore.buftypes) == "table" then
if vim.tbl_contains(ignore.buftypes, buftype) then
return true