Skip to content

Commit

Permalink
feat(startup): add mini-starter plugin (#836)
Browse files Browse the repository at this point in the history
* feat(mini-starter): add mini-starter plugin

* fix(mini-starter): Mark astrocore as optional

---------

Co-authored-by: Uzair Aftab <[email protected]>
  • Loading branch information
CMOISDEAD and Uzaaft authored Apr 6, 2024
1 parent 8eda9d9 commit 5da6e0a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/startup/mini-starter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Mini-Starter

Neovim Lua plugin with fast and flexible start screen. Part of 'mini.nvim' library.

**Repository**: <https://github.com/echasnovski/mini.starter>
30 changes: 30 additions & 0 deletions lua/astrocommunity/startup/mini-starter/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
return {
{ "goolord/alpha-nvim", enabled = false },
{
"echasnovski/mini.starter",
version = "*", -- stable version
config = function() require("mini.starter").setup() end,
},
{
"AstroNvim/astrocore",
optional = true,
---@type AstroCoreOpts
opts = {
mappings = {
n = {
["<Leader>c"] = {
function()
local bufs = vim.fn.getbufinfo { buflisted = true }
require("astrocore.buffer").close(0)
if require("astrocore").is_available "mini.starter" and not bufs[2] then
require("mini.starter").open()
require("astrocore.buffer").close_all(true) -- remove empty buffer
end
end,
desc = "Close buffer",
},
},
},
},
},
}

0 comments on commit 5da6e0a

Please sign in to comment.