feat: add custom mini.starter sections
This commit is contained in:
parent
6dfaad2127
commit
c3ae8bbe1e
|
@ -1,7 +1,28 @@
|
||||||
MiniDeps.now(
|
local function default_header()
|
||||||
function()
|
local hour = tonumber(vim.fn.strftime("%H"))
|
||||||
require("mini.starter").setup({
|
local part_id = math.floor((hour + 4) / 8) + 1
|
||||||
query_updaters = "abcdefghijklmnopqrstuvwxyz0123456789_.",
|
local day_part = ({ "evening", "morning", "afternoon", "evening" })[part_id]
|
||||||
})
|
local username = vim.loop.os_get_passwd()["username"] or "USERNAME"
|
||||||
end
|
|
||||||
)
|
return ("good %s, %s"):format(day_part, username)
|
||||||
|
end
|
||||||
|
|
||||||
|
MiniDeps.now(function()
|
||||||
|
require("mini.starter").setup({
|
||||||
|
query_updaters = "abcdefghijklmnopqrstuvwxyz0123456789_.",
|
||||||
|
evaluate_single = true,
|
||||||
|
header = default_header,
|
||||||
|
footer = "",
|
||||||
|
items = {
|
||||||
|
--stylua: ignore start
|
||||||
|
-- builtins
|
||||||
|
{ name = "edit new buffer", action = "enew", section = "builtin actions" },
|
||||||
|
{ name = "quit neovim", action = "qall", section = "builtin actions" },
|
||||||
|
-- dependencies
|
||||||
|
{ name = "update dependencies", action = "DepsUpdate", section = "dependencies" },
|
||||||
|
{ name = "snap dependencies", action = "DepsSnapSave", section = "dependencies" },
|
||||||
|
{ name = "load dependencies", action = "DepsSnapLoad", section = "dependencies" },
|
||||||
|
--stylua: ignore end
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
|
Loading…
Reference in New Issue