up
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
-- mini
|
||||
--
|
||||
-- ibrary of 40+ independent Lua modules improving overall
|
||||
-- Neovim (version 0.9 and higher) experience with minimal effort.
|
||||
-- They all share same configuration approaches and general design principles.
|
||||
--
|
||||
-- https://github.com/echasnovski/mini.nvim
|
||||
--
|
||||
|
||||
return {
|
||||
{ -- Collection of various small independent plugins/modules
|
||||
@@ -37,9 +43,10 @@ return {
|
||||
end
|
||||
|
||||
local starter = require 'mini.starter'
|
||||
local logo = require 'kickstart.plugins.logos'
|
||||
local logo = require 'custom.plugins.logos'
|
||||
starter.setup {
|
||||
evaluate_single = true,
|
||||
event = 'VimEnter',
|
||||
header = table.concat(logo.neovim1, '\n'),
|
||||
items = {
|
||||
{ action = 'Neotree reveal=true position=float dir=~/.config/nvim/', name = ' Configuration', section = 'General' },
|
||||
@@ -53,6 +60,32 @@ return {
|
||||
require('mini.starter').gen_hook.adding_bullet ' ',
|
||||
require('mini.starter').gen_hook.aligning('center', 'center'),
|
||||
},
|
||||
config = function()
|
||||
-- close Lazy and re-open when starter is ready
|
||||
if vim.o.filetype == 'lazy' then
|
||||
vim.cmd.close()
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'MiniStarterOpened',
|
||||
callback = function()
|
||||
require('lazy').show()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'LazyVimStarted',
|
||||
callback = function(ev)
|
||||
local stats = require('lazy').stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
local pad_footer = string.rep(' ', 8)
|
||||
starter.config.footer = pad_footer .. '⚡ Neovim loaded ' .. stats.count .. ' plugins in ' .. ms .. 'ms'
|
||||
-- INFO: based on @echasnovski's recommendation (thanks a lot!!!)
|
||||
if vim.bo[ev.buf].filetype == 'ministarter' then
|
||||
pcall(starter.refresh)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
-- Simple way to visualize and work with indent scope
|
||||
@@ -84,12 +117,38 @@ return {
|
||||
|
||||
-- Animate common Neovim actions
|
||||
local animate = require 'mini.animate'
|
||||
animate.setup {}
|
||||
animate.setup {
|
||||
optional = true,
|
||||
opts = {
|
||||
cursor = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Buffer removing (unshow, delete, wipeout), which saves window layout
|
||||
local bufremove = require 'mini.bufremove'
|
||||
bufremove.setup {}
|
||||
|
||||
local icons = require 'mini.icons'
|
||||
icons.setup {
|
||||
opts = {
|
||||
file = {
|
||||
['.chezmoiignore'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['.chezmoiremove'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['.chezmoiroot'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['.chezmoiversion'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['bash.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['json.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['ps1.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['sh.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['toml.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['yaml.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
['zsh.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- ... and there is more!
|
||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user