AutoYADM commit: 2024-12-04 17:45:04
This commit is contained in:
parent
48a7adc5f4
commit
0ab055d780
3 changed files with 125 additions and 125 deletions
|
@ -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 = [[
|
-- local saturn = [[
|
||||||
_.oo.
|
-- _.oo.
|
||||||
_.u[[/;:,. .odMMMMMM'
|
-- _.u[[/;:,. .odMMMMMM'
|
||||||
.o888UU[[[/;:-. .o@P^ MMM^
|
-- .o888UU[[[/;:-. .o@P^ MMM^
|
||||||
oN88888UU[[[/;::-. dP^
|
-- oN88888UU[[[/;::-. dP^
|
||||||
dNMMNN888UU[[[/;:--. .o@P^
|
-- dNMMNN888UU[[[/;:--. .o@P^
|
||||||
,MMMMMMN888UU[[/;::-. o@^
|
-- ,MMMMMMN888UU[[/;::-. o@^
|
||||||
NNMMMNN888UU[[[/~.o@P^
|
-- NNMMMNN888UU[[[/~.o@P^
|
||||||
888888888UU[[[/o@^-..
|
-- 888888888UU[[[/o@^-..
|
||||||
oI8888UU[[[/o@P^:--..
|
-- oI8888UU[[[/o@P^:--..
|
||||||
.@^ YUU[[[/o@^;::---..
|
-- .@^ YUU[[[/o@^;::---..
|
||||||
oMP ^/o@P^;:::---..
|
-- oMP ^/o@P^;:::---..
|
||||||
.dMMM .o@^ ^;::---...
|
-- .dMMM .o@^ ^;::---...
|
||||||
dMMMMMMM@^` `^^^^
|
-- dMMMMMMM@^` `^^^^
|
||||||
YMMMUP^
|
-- YMMMUP^
|
||||||
^^
|
-- ^^
|
||||||
]]
|
-- ]]
|
||||||
|
--
|
||||||
-- logo = string.rep("\n", 8) .. logo .. "\n\n"
|
-- -- logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
saturn = string.rep("\n", 8) .. saturn .. "\n\n"
|
-- saturn = string.rep("\n", 8) .. saturn .. "\n\n"
|
||||||
|
--
|
||||||
local function loadObsidian()
|
-- local function loadObsidian()
|
||||||
-- require("lazy").setup(require("plugins.obsidian"))
|
-- -- require("lazy").setup(require("plugins.obsidian"))
|
||||||
require("obsidian")
|
-- require("obsidian")
|
||||||
-- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>")
|
-- -- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>")
|
||||||
vim.api.nvim_input("<cmd>ObsidianTags<cr>")
|
-- vim.api.nvim_input("<cmd>ObsidianTags<cr>")
|
||||||
end
|
-- end
|
||||||
local function openConfig()
|
-- local function openConfig()
|
||||||
local dir = "~/.config/nvim/"
|
-- local dir = "~/.config/nvim/"
|
||||||
vim.api.nvim_set_current_dir(dir)
|
-- vim.api.nvim_set_current_dir(dir)
|
||||||
vim.cmd("edit" .. dir)
|
-- vim.cmd("edit" .. dir)
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
local opts = {
|
-- local opts = {
|
||||||
theme = "doom",
|
-- theme = "doom",
|
||||||
hide = {
|
-- hide = {
|
||||||
-- this is taken care of by lualine
|
-- -- this is taken care of by lualine
|
||||||
-- enabling this messes up the actual laststatus setting after loading a file
|
-- -- enabling this messes up the actual laststatus setting after loading a file
|
||||||
statusline = false,
|
-- statusline = false,
|
||||||
},
|
-- },
|
||||||
config = {
|
-- config = {
|
||||||
-- header = vim.split(logo, "\n"),
|
-- -- header = vim.split(logo, "\n"),
|
||||||
header = vim.split(saturn, "\n"),
|
-- header = vim.split(saturn, "\n"),
|
||||||
-- stylua: ignore
|
-- -- stylua: ignore
|
||||||
center = {
|
-- center = {
|
||||||
-- { action = function() vim.cmd("edit " .. "~/second-brain/00-index/00-index.md") end, desc = " Open Obsidian Vault", icon = " ", key = "o" },
|
-- -- { action = function() vim.cmd("edit " .. "~/second-brain/00-index/00-index.md") end, desc = " Open Obsidian Vault", icon = " ", key = "o" },
|
||||||
-- { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
-- -- { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" },
|
||||||
-- { action = loadObsidian, desc = " Obsidian Tags", icon = " ", key = "o" },
|
-- -- { action = loadObsidian, desc = " Obsidian Tags", icon = " ", key = "o" },
|
||||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
-- { 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 = 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("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" },
|
||||||
-- { action = 'lua LazyVim.pick("live_grep")()', desc = " Grep", icon = " ", key = "/" },
|
-- -- { action = 'lua LazyVim.pick("live_grep")()', desc = " Grep", icon = " ", key = "/" },
|
||||||
-- { action = function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, desc = " Git", icon = " ", key = "g" },
|
-- -- { action = function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, desc = " Git", icon = " ", key = "g" },
|
||||||
{ action = 'lua LazyVim.pick.config_files()()', desc = " Search Config", icon = " ", key = "c" },
|
-- { action = 'lua LazyVim.pick.config_files()()', desc = " Search Config", icon = " ", key = "c" },
|
||||||
-- { action = openConfig, desc = " Open Config", icon = " ", key = "c" },
|
-- -- { action = openConfig, desc = " Open Config", icon = " ", key = "c" },
|
||||||
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
-- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||||
-- { action = 'lua require("persistence").select()', desc = " Select Session", icon = " ", key = "S" },
|
-- -- { action = 'lua require("persistence").select()', desc = " Select Session", icon = " ", key = "S" },
|
||||||
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
-- -- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||||
-- { action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
-- -- { action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
{ action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
-- { action = function() vim.api.nvim_input("<cmd>qa<cr>") end, desc = " Quit", icon = " ", key = "q" },
|
||||||
},
|
-- },
|
||||||
footer = function()
|
-- footer = function()
|
||||||
local stats = require("lazy").stats()
|
-- local stats = require("lazy").stats()
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
-- local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
-- return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
}
|
-- }
|
||||||
|
--
|
||||||
for _, button in ipairs(opts.config.center) do
|
-- for _, button in ipairs(opts.config.center) do
|
||||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
-- button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
button.key_format = " %s"
|
-- button.key_format = " %s"
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
-- open dashboard after closing lazy
|
-- -- open dashboard after closing lazy
|
||||||
if vim.o.filetype == "lazy" then
|
-- if vim.o.filetype == "lazy" then
|
||||||
vim.api.nvim_create_autocmd("WinClosed", {
|
-- vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
pattern = tostring(vim.api.nvim_get_current_win()),
|
-- pattern = tostring(vim.api.nvim_get_current_win()),
|
||||||
once = true,
|
-- once = true,
|
||||||
callback = function()
|
-- callback = function()
|
||||||
vim.schedule(function()
|
-- vim.schedule(function()
|
||||||
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
-- vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
||||||
end)
|
-- end)
|
||||||
end,
|
-- end,
|
||||||
})
|
-- })
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
return opts
|
-- return opts
|
||||||
end,
|
-- end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue