AutoYADM commit: 2024-11-22 02:18:15
This commit is contained in:
parent
5f24f10427
commit
9745c8159f
38 changed files with 1122 additions and 1687 deletions
103
.config/nvim-min/lua/plugins/dashboard.lua
Normal file
103
.config/nvim-min/lua/plugins/dashboard.lua
Normal file
|
@ -0,0 +1,103 @@
|
|||
return {
|
||||
"nvimdev/dashboard-nvim",
|
||||
lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
|
||||
opts = function()
|
||||
-- local logo = [[
|
||||
-- ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ 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^
|
||||
^^
|
||||
]]
|
||||
|
||||
-- logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
saturn = string.rep("\n", 8) .. saturn .. "\n\n"
|
||||
|
||||
local function loadObsidian()
|
||||
-- require("lazy").setup(require("plugins.obsidian"))
|
||||
require("obsidian")
|
||||
-- vim.api.nvim_input("<cmd>ObsidianWorkspace<cr>")
|
||||
vim.api.nvim_input("<cmd>ObsidianTags<cr>")
|
||||
end
|
||||
local function openConfig()
|
||||
local dir = "~/.config/nvim/"
|
||||
vim.api.nvim_set_current_dir(dir)
|
||||
vim.cmd("edit" .. dir)
|
||||
end
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
hide = {
|
||||
-- this is taken care of by lualine
|
||||
-- enabling this messes up the actual laststatus setting after loading a file
|
||||
statusline = false,
|
||||
},
|
||||
config = {
|
||||
-- header = vim.split(logo, "\n"),
|
||||
header = vim.split(saturn, "\n"),
|
||||
-- stylua: ignore
|
||||
center = {
|
||||
-- { 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 = loadObsidian, desc = " Obsidian Tags", icon = " ", key = "o" },
|
||||
{ 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 = "/" },
|
||||
-- { 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 = openConfig, desc = " Open Config", icon = " ", key = "c" },
|
||||
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||
-- { action = 'lua require("persistence").select()', desc = " Select Session", icon = " ", key = "S" },
|
||||
-- { 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" },
|
||||
},
|
||||
footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
for _, button in ipairs(opts.config.center) do
|
||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||
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,
|
||||
}
|
10
.config/nvim-min/lua/plugins/disabled.lua
Normal file
10
.config/nvim-min/lua/plugins/disabled.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
{ "nvim-neo-tree/neo-tree.nvim", enabled = false },
|
||||
{ "folke/tokyonight.nvim", enabled = false },
|
||||
{ "catpuccin/nvim", enabled = false },
|
||||
-- { "folke/noice.nvim", enabled = false },
|
||||
}
|
||||
-- TODO:
|
||||
-- figure out how to make markdown extra work together with Obsidian, disable it for now
|
||||
-- either I can use the extra in markdown files but disable it and use obsidian in vault md files
|
||||
-- OR find some way for them to coexist?
|
54
.config/nvim-min/lua/plugins/extend-mini-files.lua
Normal file
54
.config/nvim-min/lua/plugins/extend-mini-files.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
return {
|
||||
"echasnovski/mini.files",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
|
||||
end,
|
||||
desc = "Open mini.files (current file directory)",
|
||||
},
|
||||
{
|
||||
"<leader>fm",
|
||||
function()
|
||||
require("mini.files").open(vim.uv.cwd(), true)
|
||||
end,
|
||||
desc = "Open mini.files (cwd)",
|
||||
},
|
||||
{
|
||||
"<leader>E",
|
||||
function()
|
||||
require("mini.files").open(LazyVim.root(), true)
|
||||
end,
|
||||
desc = "Open mini.files (root)",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
content = {
|
||||
-- hide hidden files by default
|
||||
filter = function(fs_entry)
|
||||
return not vim.startswith(fs_entry.name, ".")
|
||||
end,
|
||||
},
|
||||
mappings = {
|
||||
go_in_plus = "<CR>",
|
||||
synchronize = ":w",
|
||||
-- close = "q",
|
||||
-- go_in = "i",
|
||||
-- go_out = "m",
|
||||
-- go_out_plus = "M",
|
||||
-- mark_goto = "'",
|
||||
-- mark_set = "k",
|
||||
-- reset = "<BS>",
|
||||
-- reveal_cwd = "@",
|
||||
-- show_help = "g?",
|
||||
-- trim_left = "<",
|
||||
-- trim_right = ">",
|
||||
},
|
||||
options = {
|
||||
permanent_delete = false,
|
||||
use_as_default_explorer = true,
|
||||
},
|
||||
},
|
||||
}
|
8
.config/nvim-min/lua/plugins/lazy.lua
Normal file
8
.config/nvim-min/lua/plugins/lazy.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
"folke/lazy.nvim",
|
||||
opts = {
|
||||
install = {
|
||||
colorscheme = { "noirbuddy" },
|
||||
},
|
||||
},
|
||||
}
|
20
.config/nvim-min/lua/plugins/lualine.lua
Normal file
20
.config/nvim-min/lua/plugins/lualine.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
-- local noirbuddy_lualine = require("noirbuddy.plugins.lualine")
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"jesseleite/nvim-noirbuddy",
|
||||
},
|
||||
config = function()
|
||||
local noirbuddy_lualine = require("noirbuddy.plugins.lualine")
|
||||
local theme = noirbuddy_lualine.theme
|
||||
local sections = noirbuddy_lualine.sections
|
||||
local inactive_sections = noirbuddy_lualine.inactive_sections
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = theme,
|
||||
},
|
||||
sections = sections,
|
||||
inactive_sections = inactive_sections,
|
||||
})
|
||||
end,
|
||||
}
|
35
.config/nvim-min/lua/plugins/markdown.lua
Normal file
35
.config/nvim-min/lua/plugins/markdown.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local function retmap()
|
||||
local m = {
|
||||
inline_surround_toggle = "<leader>mm", -- (string|boolean) toggle inline style
|
||||
inline_surround_toggle_line = "<leader>mmm", -- (string|boolean) line-wise toggle inline style
|
||||
inline_surround_delete = "<leader>md", -- (string|boolean) delete emphasis surrounding cursor
|
||||
inline_surround_change = "<leader>mc", -- (string|boolean) change emphasis surrounding cursor
|
||||
-- link_add = "<leader>ml", -- (string|boolean) add link
|
||||
-- link_follow = "<leader>mx", -- (string|boolean) follow link
|
||||
go_curr_heading = "<leader>mh",
|
||||
go_parent_heading = "<leader>mH",
|
||||
go_next_heading = "<M-n>",
|
||||
go_prev_heading = "<M-e>",
|
||||
}
|
||||
require("which-key").add({
|
||||
{ "<leader>m", group = "Markdown" },
|
||||
})
|
||||
vim.keymap.set("n", "<leader>mu", "<cmd>MDListItemAbove<cr>", { desc = "Insert List Item Above", silent = true })
|
||||
vim.keymap.set(
|
||||
{ "n", "x" },
|
||||
"<leader>ml",
|
||||
"<cmd>MDResetListNumbering<cr>",
|
||||
{ desc = "Reset List Numbering", silent = true }
|
||||
)
|
||||
return m
|
||||
end
|
||||
local opts = {
|
||||
mappings = retmap(),
|
||||
}
|
||||
local spec = {
|
||||
"tadmccorkle/markdown.nvim",
|
||||
ft = "markdown",
|
||||
opts = opts,
|
||||
}
|
||||
|
||||
return spec
|
106
.config/nvim-min/lua/plugins/noirbuddy.lua
Normal file
106
.config/nvim-min/lua/plugins/noirbuddy.lua
Normal file
|
@ -0,0 +1,106 @@
|
|||
-- #0f0f0f
|
||||
-- #933737
|
||||
-- #A23D3D
|
||||
-- #994848
|
||||
-- #7B7F80
|
||||
-- #7C8080
|
||||
-- #8D8D8D
|
||||
-- #d4d4d4
|
||||
-- #949494
|
||||
-- #933737
|
||||
-- #A23D3D
|
||||
-- #994848
|
||||
-- #7B7F80
|
||||
-- #7C8080
|
||||
-- #8D8D8D
|
||||
-- #d4d4d4
|
||||
return {
|
||||
{
|
||||
"jesseleite/nvim-noirbuddy",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
{ "tjdevries/colorbuddy.nvim" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = function()
|
||||
local noiropts = {
|
||||
-- preset = "miami-nights",
|
||||
styles = {
|
||||
italic = true,
|
||||
bold = true,
|
||||
underline = true,
|
||||
undercurl = false,
|
||||
},
|
||||
colors = {
|
||||
secondary = "#BD4C4C",
|
||||
primary = "#933737",
|
||||
diagnostic_error = "#AC2020",
|
||||
diagnostic_warning = "#ff7700",
|
||||
diagnostic_info = "#d5d5d5",
|
||||
diagnostic_hint = "#d5d5d5",
|
||||
diff_add = "#f5f5f5",
|
||||
diff_change = "#737373",
|
||||
diff_delete = "#AC2020",
|
||||
},
|
||||
}
|
||||
require("noirbuddy").setup(noiropts)
|
||||
local colorbuddy = require("colorbuddy")
|
||||
|
||||
local Color = colorbuddy.Color
|
||||
local colors = colorbuddy.colors
|
||||
local Group = colorbuddy.Group
|
||||
local groups = colorbuddy.groups
|
||||
local styles = colorbuddy.styles
|
||||
Color.new("error", "#AC2020")
|
||||
Color.new("warn", "#f79000")
|
||||
Color.new("warnborder", "#79491d")
|
||||
Color.new("infoborder", "#215858")
|
||||
Color.new("complement", "#379393")
|
||||
-- Override specific highlight groups
|
||||
-- Group.new("Type", colors.complement)
|
||||
Group.new("DiagnosticOk", colors.diagnostic_info)
|
||||
Group.new("Added", colors.diff_change)
|
||||
Group.new("Removed", colors.primary)
|
||||
Group.new("Changed", colors.complement)
|
||||
Group.new("@markup.link", colors.secondary)
|
||||
Group.new("@markup.list", colors.complement)
|
||||
Group.new("@variable", colors.complement)
|
||||
Group.new("@type.builtin", colors.primary)
|
||||
Group.new("@number", colors.secondary)
|
||||
Group.new("NonText", colors.noir_7)
|
||||
Group.new("Comment", colors.noir_6)
|
||||
Group.new("@comment", colors.noir_6)
|
||||
Group.new("@boolean.go", colors.complement)
|
||||
Group.new("@boolean", colors.complement)
|
||||
Group.new("@keyword.return", colors.complement)
|
||||
-- Group.new("gotype", colors.primary)
|
||||
Group.new("Boolean", colors.complement)
|
||||
Group.new("Constant", colors.complement)
|
||||
-- TODO: change these groups to match Snacks instead...
|
||||
-- Is that even needed actually?
|
||||
Group.new("DashboardHeader", colors.primary)
|
||||
Group.new("DashboardIcon", colors.primary)
|
||||
Group.new("DashboardKey", colors.complement)
|
||||
Group.new("NotifyINFOBorder", colors.infoborder)
|
||||
Group.new("NotifyINFOTitle", colors.complement)
|
||||
Group.new("NotifyINFOIcon", colors.complement)
|
||||
Group.new("NotifyWARNBorder", colors.warnborder)
|
||||
Group.new("NotifyWARNTitle", colors.warn)
|
||||
Group.new("NotifyWARNIcon", colors.warn)
|
||||
Group.new("NotifyERRORBorder", colors.error)
|
||||
Group.new("NotifyERRORTitle", colors.error)
|
||||
Group.new("NotifyERRORIcon", colors.error)
|
||||
Group.new("ErrorMsg", colors.noir_1, colors.error)
|
||||
Group.new("SpellBad", nil, nil, styles.undercurl)
|
||||
Group.new("SpellCap", nil, nil, styles.undercurl)
|
||||
Group.new("String", colors.primary, nil, nil)
|
||||
Group.new("Title", colors.primary, nil, styles.bold)
|
||||
local linkhl = require("link-hl")
|
||||
linkhl.link(linkhl.go_map, "go")
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
24
.config/nvim-min/lua/plugins/snacks.lua
Normal file
24
.config/nvim-min/lua/plugins/snacks.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
bigfile = {
|
||||
notify = true,
|
||||
size = 1.5 * 1024 * 1024, -- 1.5MB
|
||||
---@param ctx {buf: number, ft:string}
|
||||
setup = function(ctx)
|
||||
vim.b.minianimate_disable = true
|
||||
vim.cmd("set conceallevel=0")
|
||||
vim.cmd("TSBufDisable highlight")
|
||||
vim.opt_local.foldenable = false
|
||||
vim.cmd("NoMatchParen")
|
||||
vim.opt_local.cursorline = false
|
||||
vim.opt_local.signcolumn = "no"
|
||||
vim.opt_local.spell = false
|
||||
vim.schedule(function()
|
||||
vim.bo[ctx.buf].syntax = ctx.ft
|
||||
end)
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
9
.config/nvim-min/lua/plugins/vim-dirtytalk.lua
Normal file
9
.config/nvim-min/lua/plugins/vim-dirtytalk.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
"psliwka/vim-dirtytalk",
|
||||
build = ":DirtytalkUpdate",
|
||||
config = function()
|
||||
vim.opt.spelllang = { "en", "programming" }
|
||||
end,
|
||||
-- Note: let g:dirtytalk_blacklist=['lorem-ipsum'] to disable a wordlist
|
||||
-- Mus run :DirtytalkUpdate after making this change
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue