-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from pablopunk/no-tabline
add tabline=false as an option to not use the tabline
- Loading branch information
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
---@class Config | ||
local M = { | ||
local defaults = { | ||
clean_after = 3, | ||
tabline = true, | ||
} | ||
|
||
---@class Config | ||
local M = defaults | ||
|
||
---@param opts Config | ||
function M.set(opts) | ||
if opts ~= nil then | ||
if type(opts.clean_after) == "number" then | ||
M.clean_after = opts.clean_after | ||
end | ||
opts = opts or defaults | ||
|
||
if opts.clean_after ~= nil then | ||
M.clean_after = opts.clean_after | ||
end | ||
|
||
if opts.tabline ~= nil then | ||
M.tabline = opts.tabline | ||
end | ||
|
||
return opts | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters