AutoYADM commit: 2024-12-04 17:45:04

This commit is contained in:
Daniel Fichtinger 2024-12-04 17:45:04 -05:00
parent 48a7adc5f4
commit 0ab055d780
3 changed files with 125 additions and 125 deletions

View file

@ -1,104 +1,104 @@
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 logo = [[
-- ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z -- -- ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
-- ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z -- -- ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
-- ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z -- -- ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
-- ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z -- -- ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
-- ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ -- -- ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
-- ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ -- -- ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
-- -- ]]
--
-- local saturn = [[
-- _.oo.
-- _.u[[/;:,. .odMMMMMM'
-- .o888UU[[[/;:-. .o@P^ MMM^
-- oN88888UU[[[/;::-. dP^
-- dNMMNN888UU[[[/;:--. .o@P^
-- ,MMMMMMN888UU[[/;::-. o@^
-- NNMMMNN888UU[[[/~.o@P^
-- 888888888UU[[[/o@^-..
-- oI8888UU[[[/o@P^:--..
-- .@^ YUU[[[/o@^;::---..
-- oMP ^/o@P^;:::---..
-- .dMMM .o@^ ^;::---...
-- dMMMMMMM@^` `^^^^
-- YMMMUP^
-- ^^
-- ]] -- ]]
--
local saturn = [[ -- -- logo = string.rep("\n", 8) .. logo .. "\n\n"
_.oo. -- saturn = string.rep("\n", 8) .. saturn .. "\n\n"
_.u[[/;:,. .odMMMMMM' --
.o888UU[[[/;:-. .o@P^ MMM^ -- local function loadObsidian()
oN88888UU[[[/;::-. dP^ -- -- require("lazy").setup(require("plugins.obsidian"))
dNMMNN888UU[[[/;:--. .o@P^ -- require("obsidian")
,MMMMMMN888UU[[/;::-. o@^ -- -- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>")
NNMMMNN888UU[[[/~.o@P^ -- vim.api.nvim_input("<cmd>ObsidianTags<cr>")
888888888UU[[[/o@^-.. -- end
oI8888UU[[[/o@P^:--.. -- local function openConfig()
.@^ YUU[[[/o@^;::---.. -- local dir = "~/.config/nvim/"
oMP ^/o@P^;:::---.. -- vim.api.nvim_set_current_dir(dir)
.dMMM .o@^ ^;::---... -- vim.cmd("edit" .. dir)
dMMMMMMM@^` `^^^^ -- end
YMMMUP^ --
^^ -- local opts = {
]] -- theme = "doom",
-- hide = {
-- logo = string.rep("\n", 8) .. logo .. "\n\n" -- -- this is taken care of by lualine
saturn = string.rep("\n", 8) .. saturn .. "\n\n" -- -- enabling this messes up the actual laststatus setting after loading a file
-- statusline = false,
local function loadObsidian() -- },
-- require("lazy").setup(require("plugins.obsidian")) -- config = {
require("obsidian") -- -- header = vim.split(logo, "\n"),
-- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>") -- header = vim.split(saturn, "\n"),
vim.api.nvim_input("<cmd>ObsidianTags<cr>") -- -- stylua: ignore
end -- center = {
local function openConfig() -- -- { action = function() vim.cmd("edit " .. "~/second-brain/00-index/00-index.md") end, desc = " Open Obsidian Vault", icon = " ", key = "o" },
local dir = "~/.config/nvim/" -- -- { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
vim.api.nvim_set_current_dir(dir) -- -- { action = loadObsidian, desc = " Obsidian Tags", icon = "󱤇 ", key = "o" },
vim.cmd("edit" .. dir) -- { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
end -- { action = function () vim.api.nvim_input("<CMD>ObsidianQuickSwitch<CR>") end, desc = " Obsidian", icon = " ", key = "o"},
-- { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
local opts = { -- -- { action = 'lua LazyVim.pick("live_grep")()', desc = " Grep", icon = " ", key = "/" },
theme = "doom", -- -- { action = function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, desc = " Git", icon = " ", key = "g" },
hide = { -- { action = 'lua LazyVim.pick.config_files()()', desc = " Search Config", icon = " ", key = "c" },
-- this is taken care of by lualine -- -- { action = openConfig, desc = " Open Config", icon = " ", key = "c" },
-- enabling this messes up the actual laststatus setting after loading a file -- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
statusline = false, -- -- { action = 'lua require("persistence").select()', desc = " Select Session", icon = "󱦞 ", key = "S" },
}, -- -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
config = { -- -- { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" },
-- header = vim.split(logo, "\n"), -- { action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
header = vim.split(saturn, "\n"), -- },
-- stylua: ignore -- footer = function()
center = { -- local stats = require("lazy").stats()
-- { action = function() vim.cmd("edit " .. "~/second-brain/00-index/00-index.md") end, desc = " Open Obsidian Vault", icon = " ", key = "o" }, -- local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
-- { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, -- return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
-- { action = loadObsidian, desc = " Obsidian Tags", icon = "󱤇 ", key = "o" }, -- end,
{ action = "ene | startinsert", desc = " New File", icon = "", key = "n" }, -- },
{ action = function () vim.api.nvim_input("<CMD>ObsidianQuickSwitch<CR>") end, desc = " Obsidian", icon = "", key = "o"}, -- }
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = "", key = "r" }, --
-- { action = 'lua LazyVim.pick("live_grep")()', desc = " Grep", icon = " ", key = "/" }, -- for _, button in ipairs(opts.config.center) do
-- { action = function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, desc = " Git", icon = " ", key = "g" }, -- button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
{ action = 'lua LazyVim.pick.config_files()()', desc = " Search Config", icon = "", key = "c" }, -- button.key_format = " %s"
-- { action = openConfig, desc = " Open Config", icon = " ", key = "c" }, -- end
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" }, --
-- { action = 'lua require("persistence").select()', desc = " Select Session", icon = "󱦞 ", key = "S" }, -- -- open dashboard after closing lazy
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, -- if vim.o.filetype == "lazy" then
-- { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, -- vim.api.nvim_create_autocmd("WinClosed", {
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = "", key = "q" }, -- pattern = tostring(vim.api.nvim_get_current_win()),
}, -- once = true,
footer = function() -- callback = function()
local stats = require("lazy").stats() -- vim.schedule(function()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) -- vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } -- end)
end, -- end,
}, -- })
} -- end
--
for _, button in ipairs(opts.config.center) do -- return opts
button.desc = button.desc .. string.rep(" ", 43 - #button.desc) -- end,
button.key_format = " %s"
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()),
once = true,
callback = function()
vim.schedule(function()
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
end)
end,
})
end
return opts
end,
} }

View file

@ -24,12 +24,12 @@ return {
"mason", "mason",
"neo-tree", "neo-tree",
"notify", "notify",
"snacks_dashboard",
"snacks_notif", "snacks_notif",
"snacks_terminal", "snacks_terminal",
"snacks_win", "snacks_win",
"toggleterm", "toggleterm",
"trouble", "trouble",
"bigfile",
}, },
callback = function() callback = function()
vim.b.miniindentscope_disable = true vim.b.miniindentscope_disable = true

View file

@ -1,24 +1,24 @@
return { return {
"folke/snacks.nvim", -- "folke/snacks.nvim",
priority = 1000, -- priority = 1000,
opts = { -- opts = {
bigfile = { -- bigfile = {
notify = true, -- notify = true,
size = 1.5 * 1024 * 1024, -- 1.5MB -- size = 1.5 * 1024 * 1024, -- 1.5MB
---@param ctx {buf: number, ft:string} -- ---@param ctx {buf: number, ft:string}
setup = function(ctx) -- setup = function(ctx)
vim.b.minianimate_disable = true -- vim.b.minianimate_disable = true
vim.cmd("set conceallevel=0") -- vim.cmd("set conceallevel=0")
vim.cmd("TSBufDisable highlight") -- vim.cmd("TSBufDisable highlight")
vim.opt_local.foldenable = false -- vim.opt_local.foldenable = false
vim.cmd("NoMatchParen") -- vim.cmd("NoMatchParen")
vim.opt_local.cursorline = false -- vim.opt_local.cursorline = false
vim.opt_local.signcolumn = "no" -- vim.opt_local.signcolumn = "no"
vim.opt_local.spell = false -- vim.opt_local.spell = false
vim.schedule(function() -- vim.schedule(function()
vim.bo[ctx.buf].syntax = ctx.ft -- vim.bo[ctx.buf].syntax = ctx.ft
end) -- end)
end, -- end,
}, -- },
}, -- },
} }