AutoYADM commit: 2024-12-04 18:10:03
This commit is contained in:
parent
a0720a97d1
commit
02ca526c0d
2 changed files with 94 additions and 141 deletions
|
@ -49,15 +49,7 @@ return {
|
||||||
YMMMUP^
|
YMMMUP^
|
||||||
^^
|
^^
|
||||||
]],
|
]],
|
||||||
-- header = [[
|
},
|
||||||
-- ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
|
|
||||||
-- ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
|
|
||||||
-- ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
|
|
||||||
-- ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
|
||||||
-- ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
||||||
-- ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]],
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- item field formatters
|
-- item field formatters
|
||||||
formats = {
|
formats = {
|
||||||
icon = function(item)
|
icon = function(item)
|
||||||
|
@ -91,33 +83,3 @@ YMMMUP^
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
-- return {
|
|
||||||
-- "folke/snacks.nvim",
|
|
||||||
-- opts = {
|
|
||||||
-- dashboard = {
|
|
||||||
-- preset = {
|
|
||||||
-- header = [[
|
|
||||||
-- ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
|
||||||
-- ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
|
||||||
-- ██║ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX█╔████╔██║ z
|
|
||||||
-- ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
|
||||||
-- ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
|
||||||
-- ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
|
||||||
-- ]],
|
|
||||||
-- -- stylua: ignore
|
|
||||||
-- ---@type snacks.dashboard.Item[]
|
|
||||||
-- keys = {
|
|
||||||
-- { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
|
|
||||||
-- { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" },
|
|
||||||
-- { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" },
|
|
||||||
-- { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" },
|
|
||||||
-- { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" },
|
|
||||||
-- { icon = " ", key = "s", desc = "Restore Session", section = "session" },
|
|
||||||
-- { icon = " ", key = "x", desc = "Lazy Extras", action = ":LazyExtras" },
|
|
||||||
-- { icon = " ", key = "l", desc = "Lazy", action = ":Lazy" },
|
|
||||||
-- { icon = " ", key = "q", desc = "Quit", action = ":qa" },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
|
|
|
@ -1,104 +1,95 @@
|
||||||
return {
|
return {
|
||||||
-- "nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
-- enabled = false,
|
enabled = false,
|
||||||
-- lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
|
lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
|
||||||
-- opts = function()
|
opts = function()
|
||||||
-- -- local logo = [[
|
local saturn = [[
|
||||||
-- -- ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
_.oo.
|
||||||
-- -- ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
_.u[[/;:,. .odMMMMMM'
|
||||||
-- -- ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
.o888UU[[[/;:-. .o@P^ MMM^
|
||||||
-- -- ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
oN88888UU[[[/;::-. dP^
|
||||||
-- -- ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
dNMMNN888UU[[[/;:--. .o@P^
|
||||||
-- -- ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
,MMMMMMN888UU[[/;::-. o@^
|
||||||
-- -- ]]
|
NNMMMNN888UU[[[/~.o@P^
|
||||||
--
|
888888888UU[[[/o@^-..
|
||||||
-- local saturn = [[
|
oI8888UU[[[/o@P^:--..
|
||||||
-- _.oo.
|
.@^ YUU[[[/o@^;::---..
|
||||||
-- _.u[[/;:,. .odMMMMMM'
|
oMP ^/o@P^;:::---..
|
||||||
-- .o888UU[[[/;:-. .o@P^ MMM^
|
.dMMM .o@^ ^;::---...
|
||||||
-- oN88888UU[[[/;::-. dP^
|
dMMMMMMM@^` `^^^^
|
||||||
-- dNMMNN888UU[[[/;:--. .o@P^
|
YMMMUP^
|
||||||
-- ,MMMMMMN888UU[[/;::-. o@^
|
^^
|
||||||
-- NNMMMNN888UU[[[/~.o@P^
|
]]
|
||||||
-- 888888888UU[[[/o@^-..
|
|
||||||
-- oI8888UU[[[/o@P^:--..
|
-- logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
-- .@^ YUU[[[/o@^;::---..
|
saturn = string.rep("\n", 8) .. saturn .. "\n\n"
|
||||||
-- oMP ^/o@P^;:::---..
|
|
||||||
-- .dMMM .o@^ ^;::---...
|
local function loadObsidian()
|
||||||
-- dMMMMMMM@^` `^^^^
|
-- require("lazy").setup(require("plugins.obsidian"))
|
||||||
-- YMMMUP^
|
require("obsidian")
|
||||||
-- ^^
|
-- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>")
|
||||||
-- ]]
|
vim.api.nvim_input("<cmd>ObsidianTags<cr>")
|
||||||
--
|
end
|
||||||
-- -- logo = string.rep("\n", 8) .. logo .. "\n\n"
|
local function openConfig()
|
||||||
-- saturn = string.rep("\n", 8) .. saturn .. "\n\n"
|
local dir = "~/.config/nvim/"
|
||||||
--
|
vim.api.nvim_set_current_dir(dir)
|
||||||
-- local function loadObsidian()
|
vim.cmd("edit" .. dir)
|
||||||
-- -- require("lazy").setup(require("plugins.obsidian"))
|
end
|
||||||
-- require("obsidian")
|
|
||||||
-- -- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>")
|
local opts = {
|
||||||
-- vim.api.nvim_input("<cmd>ObsidianTags<cr>")
|
theme = "doom",
|
||||||
-- end
|
hide = {
|
||||||
-- local function openConfig()
|
-- this is taken care of by lualine
|
||||||
-- local dir = "~/.config/nvim/"
|
-- enabling this messes up the actual laststatus setting after loading a file
|
||||||
-- vim.api.nvim_set_current_dir(dir)
|
statusline = false,
|
||||||
-- vim.cmd("edit" .. dir)
|
},
|
||||||
-- end
|
config = {
|
||||||
--
|
-- header = vim.split(logo, "\n"),
|
||||||
-- local opts = {
|
header = vim.split(saturn, "\n"),
|
||||||
-- theme = "doom",
|
-- stylua: ignore
|
||||||
-- hide = {
|
center = {
|
||||||
-- -- this is taken care of by lualine
|
-- { action = function() vim.cmd("edit " .. "~/second-brain/00-index/00-index.md") end, desc = " Open Obsidian Vault", icon = " ", key = "o" },
|
||||||
-- -- enabling this messes up the actual laststatus setting after loading a file
|
-- { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
||||||
-- statusline = false,
|
-- { action = loadObsidian, desc = " Obsidian Tags", icon = " ", key = "o" },
|
||||||
-- },
|
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||||
-- config = {
|
{ action = function () vim.api.nvim_input("<CMD>ObsidianQuickSwitch<CR>") end, desc = " Obsidian", icon = " ", key = "o"},
|
||||||
-- -- header = vim.split(logo, "\n"),
|
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
|
||||||
-- header = vim.split(saturn, "\n"),
|
-- { action = 'lua LazyVim.pick("live_grep")()', desc = " Grep", icon = " ", key = "/" },
|
||||||
-- -- stylua: ignore
|
-- { action = function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, desc = " Git", icon = " ", key = "g" },
|
||||||
-- center = {
|
{ action = 'lua LazyVim.pick.config_files()()', desc = " Search Config", icon = " ", key = "c" },
|
||||||
-- -- { action = function() vim.cmd("edit " .. "~/second-brain/00-index/00-index.md") end, desc = " Open Obsidian Vault", icon = " ", key = "o" },
|
-- { action = openConfig, desc = " Open Config", icon = " ", key = "c" },
|
||||||
-- -- { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||||
-- -- { action = loadObsidian, desc = " Obsidian Tags", icon = " ", key = "o" },
|
-- { action = 'lua require("persistence").select()', desc = " Select Session", icon = " ", key = "S" },
|
||||||
-- { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||||
-- { action = function () vim.api.nvim_input("<CMD>ObsidianQuickSwitch<CR>") end, desc = " Obsidian", icon = " ", key = "o"},
|
-- { action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
-- { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
|
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
||||||
-- -- { action = 'lua LazyVim.pick("live_grep")()', desc = " Grep", icon = " ", key = "/" },
|
},
|
||||||
-- -- { action = function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, desc = " Git", icon = " ", key = "g" },
|
footer = function()
|
||||||
-- { action = 'lua LazyVim.pick.config_files()()', desc = " Search Config", icon = " ", key = "c" },
|
local stats = require("lazy").stats()
|
||||||
-- -- { action = openConfig, desc = " Open Config", icon = " ", key = "c" },
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
-- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
-- -- { action = 'lua require("persistence").select()', desc = " Select Session", icon = " ", key = "S" },
|
end,
|
||||||
-- -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
},
|
||||||
-- -- { action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
}
|
||||||
-- { action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
|
||||||
-- },
|
for _, button in ipairs(opts.config.center) do
|
||||||
-- footer = function()
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
-- local stats = require("lazy").stats()
|
button.key_format = " %s"
|
||||||
-- local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
end
|
||||||
-- return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
|
||||||
-- end,
|
-- open dashboard after closing lazy
|
||||||
-- },
|
if vim.o.filetype == "lazy" then
|
||||||
-- }
|
vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
--
|
pattern = tostring(vim.api.nvim_get_current_win()),
|
||||||
-- for _, button in ipairs(opts.config.center) do
|
once = true,
|
||||||
-- button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
callback = function()
|
||||||
-- button.key_format = " %s"
|
vim.schedule(function()
|
||||||
-- end
|
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
||||||
--
|
end)
|
||||||
-- -- open dashboard after closing lazy
|
end,
|
||||||
-- if vim.o.filetype == "lazy" then
|
})
|
||||||
-- vim.api.nvim_create_autocmd("WinClosed", {
|
end
|
||||||
-- pattern = tostring(vim.api.nvim_get_current_win()),
|
|
||||||
-- once = true,
|
return opts
|
||||||
-- callback = function()
|
end,
|
||||||
-- vim.schedule(function()
|
|
||||||
-- vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
|
||||||
-- end)
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- return opts
|
|
||||||
-- end,
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue