🧙 Major Restructuring Update

- Plugins are now properly organized into separate folders.
- General configurations are also now organized by category into
folders.
- Now using lazyvim-defined plugins whenever possible for a more
consistent and clean experience.
- Duplicate manual plugin definitions were removed.
- Extensive testing has been performed to ensure config works on fresh
installs and a variety of systems.
- Further slimming of manual plugins and an updated dependency list is
forthcoming.
This commit is contained in:
2024-07-08 10:17:08 -04:00
parent 5c3dcaddd7
commit c0a3511384
34 changed files with 865 additions and 728 deletions
+25
View File
@@ -0,0 +1,25 @@
-- -----------------------------------------------------------------------------
-- ----------------------------- auto-dark-mode --------------------------------
-- -----------------------------------------------------------------------------
return {
"f-person/auto-dark-mode.nvim",
lazy = true,
opts = {
update_interval = 1000,
set_dark_mode = function()
vim.o.background = "dark"
local kitty_theme = os.getenv("KITTY_THEME")
vim.cmd.colorscheme(kitty_theme or "catppuccin-frappe")
end,
set_light_mode = function()
vim.o.background = "light"
local kitty_theme = os.getenv("KITTY_THEME")
vim.cmd.colorscheme(kitty_theme or "catppuccin-latte")
end,
},
cond = function() -- Not Using SSH or root
local ssh = os.getenv("SSH_TTY")
local user = os.getenv("USER")
return not ssh and user ~= "root"
end,
}
+9
View File
@@ -0,0 +1,9 @@
-- -----------------------------------------------------------------------------
-- -------------------------------- auto-save ----------------------------------
-- -----------------------------------------------------------------------------
return {
"Pocco81/auto-save.nvim",
config = function()
require("auto-save").setup({})
end,
}
+7
View File
@@ -0,0 +1,7 @@
-- -----------------------------------------------------------------------------
-- ----------------------------------- Ayu -------------------------------------
-- -----------------------------------------------------------------------------
return{
"Shatur/neovim-ayu",
lazy = true
}
+43
View File
@@ -0,0 +1,43 @@
-- -----------------------------------------------------------------------------
-- -------------------------------- CodeSnap -----------------------------------
-- -----------------------------------------------------------------------------
return {
"mistricky/codesnap.nvim",
build = "make",
keys = {
{
"<leader>cy",
"<cmd>CodeSnap<cr>",
mode = "x",
desc = "󰹑 Save selected code snapshot into clipboard",
},
{
"<leader>cs",
"<cmd>CodeSnapSave<cr>",
mode = "x",
desc = "󰉏 Save selected code snapshot in ~/Pictures",
},
{
"<leader>ch",
"<cmd>CodeSnapHighlight<cr>",
mode = "x",
desc = " Highlight and snapshot selected code into clipboard",
},
{
"<leader>ci",
"<cmd>CodeSnapASCII<cr>",
mode = "x",
desc = " Save ASCII code snapshot into clipboard",
},
},
opts = {
save_path = "~/Pictures/Screenshots/",
has_breadcrumbs = true,
show_workspace = true,
--has_line_number = true,
bg_theme = "default",
watermark = "Rootiest Snippets",
code_font_family = "CaskaydiaCove NF",
code_font_size = 12,
},
}
+33
View File
@@ -0,0 +1,33 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- CodeWindow ----------------------------------
-- -----------------------------------------------------------------------------
return {
"gorbit99/codewindow.nvim",
version = false,
config = function()
require("codewindow").setup({
active_in_terminals = false, -- Should the minimap activate for terminal buffers
auto_enable = true, -- Automatically open the minimap when entering a (non-excluded) buffer (accepts a table of filetypes)
exclude_filetypes = { "help", "dashboard" }, -- Choose certain filetypes to not show minimap on
max_minimap_height = nil, -- The maximum height the minimap can take (including borders)
max_lines = nil, -- If auto_enable is true, don't open the minimap for buffers which have more than this many lines.
minimap_width = 10, -- The width of the text part of the minimap
use_lsp = true, -- Use the builtin LSP to show errors and warnings
use_treesitter = true, -- Use nvim-treesitter to highlight the code
use_git = true, -- Show small dots to indicate git additions and deletions
width_multiplier = 4, -- How many characters one dot represents
z_index = 1, -- The z-index the floating window will be on
show_cursor = true, -- Show the cursor position in the minimap
screen_bounds = "background", -- How the visible area is displayed, "lines": lines above and below, "background": background color
window_border = "none", -- The border style of the floating window (accepts all usual options)
relative = "win", -- What will be the minimap be placed relative to, "win": the curre
events = {
"TextChanged",
"InsertLeave",
"DiagnosticChanged",
"FileWritePost",
}, -- Events that update the code window
})
require("codewindow").apply_default_keybinds()
end,
}
+9
View File
@@ -0,0 +1,9 @@
-- -----------------------------------------------------------------------------
-- --------------------------------- Comment -----------------------------------
-- -----------------------------------------------------------------------------
return {
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end,
}
+97
View File
@@ -0,0 +1,97 @@
return {
"nvimdev/dashboard-nvim",
lazy = false,
opts = function()
-- if line length is greater than 80, use fancy mode
if vim.fn.winwidth(0) >= 100 then
LOGO = [[
██████╗ ██████╗ ██████╗ ████████╗██╗███████╗███████╗████████╗ ███╗ ██╗██╗ ██╗██╗███╗ ███╗
██╔══██╗██╔═══██╗██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝╚══██╔══╝ ████╗ ██║██║ ██║██║████╗ ████║
██████╔╝██║ ██║██║ ██║ ██║ ██║█████╗ ███████╗ ██║ ██╔██╗ ██║██║ ██║██║██╔████╔██║
██╔══██╗██║ ██║██║ ██║ ██║ ██║██╔══╝ ╚════██║ ██║ ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║
██║ ██║╚██████╔╝╚██████╔╝ ██║ ██║███████╗███████║ ██║ ██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
]]
elseif vim.fn.winwidth(0) >= 80 then
LOGO = [[
███████████ █████ ███ █████
░░███░░░░░███ ░░███ ░░░ ░░███
░███ ░███ ██████ ██████ ███████ ████ ██████ █████ ███████
░██████████ ███░░███ ███░░███░░░███░ ░░███ ███░░███ ███░░ ░░░███░
░███░░░░░███ ░███ ░███░███ ░███ ░███ ░███ ░███████ ░░█████ ░███
░███ ░███ ░███ ░███░███ ░███ ░███ ███ ░███ ░███░░░ ░░░░███ ░███ ███
█████ █████░░██████ ░░██████ ░░█████ █████░░██████ ██████ ░░█████
░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░
██████ █████ █████ █████ ███
░░██████ ░░███ ░░███ ░░███ ░░░
░███░███ ░███ ░███ ░███ ████ █████████████
░███░░███░███ ░███ ░███ ░░███ ░░███░░███░░███
░███ ░░██████ ░░███ ███ ░███ ░███ ░███ ░███
░███ ░░█████ ░░░█████░ ░███ ░███ ░███ ░███
█████ ░░█████ ░░███ █████ █████░███ █████
░░░░░ ░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░
]]
else
LOGO = [[
░█▀▄░█▀█░█▀█░▀█▀░▀█▀░█▀▀░█▀▀░▀█▀░░░█▀█░█░█░▀█▀░█▄█
░█▀▄░█░█░█░█░░█░░░█░░█▀▀░▀▀█░░█░░░░█░█░▀▄▀░░█░░█░█
░▀░▀░▀▀▀░▀▀▀░░▀░░▀▀▀░▀▀▀░▀▀▀░░▀░░░░▀░▀░░▀░░▀▀▀░▀░▀
]]
end
LOGO = string.rep("\n", 8) .. LOGO .. "\n\n"
local opts = {
theme = "doom",
hide = {
statusline = false,
},
config = {
header = vim.split(LOGO, "\n"),
-- stylua: ignore
center = {
{ action = 'lua LazyVim.pick()()', desc = " Find File", icon = "", key = "f" },
{ action = "ene | startinsert", desc = " New File", icon = "", key = "n" },
{ action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = "", key = "r" },
{ action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = "", key = "g" },
{ action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = "", key = "c" },
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = "", key = "s" },
{ action = 'RemoteStart', desc = " Remote Session", icon = "󰢹 ", key = "v" },
{ 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,
}
+31
View File
@@ -0,0 +1,31 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- DeadColumn ----------------------------------
-- -----------------------------------------------------------------------------
return {
"Bekaboo/deadcolumn.nvim",
config = function()
require("deadcolumn").setup({
scope = "line", ---@type string|fun(): integer
---@type string[]|fun(mode: string): boolean
modes = function(mode)
return mode:find("^[ictRss\x13]") ~= nil
end,
blending = {
threshold = 0.9,
colorcode = "#737895",
hlgroup = { "Normal", "bg" },
},
warning = {
alpha = 0.4,
offset = 0,
colorcode = "#f27b82",
hlgroup = { "Error", "bg" },
},
extra = {
---@type string?
follow_tw = "80",
},
})
vim.cmd(":set colorcolumn=120")
end,
}
+20
View File
@@ -0,0 +1,20 @@
-- -----------------------------------------------------------------------------
-- --------------------------------- hlchunk -----------------------------------
-- -----------------------------------------------------------------------------
return {
"shellRaining/hlchunk.nvim",
lazy = false,
config = function()
require("hlchunk").setup({
chunk = {
style = {
{ fg = "#90FDA9" },
},
enable = true,
},
indent = {
enable = true,
},
})
end,
}
+10
View File
@@ -0,0 +1,10 @@
-- -----------------------------------------------------------------------------
-- ----------------------------- kitty-navigator -------------------------------
-- -----------------------------------------------------------------------------
return {
"knubie/vim-kitty-navigator",
cond = function() -- Using Kitty
local term = os.getenv("TERM")
return term and string.find(term, "kitty")
end,
}
+10
View File
@@ -0,0 +1,10 @@
-- -----------------------------------------------------------------------------
-- ------------------------------ kitty-runner ---------------------------------
-- -----------------------------------------------------------------------------
return {
"jghauser/kitty-runner.nvim",
cond = function() -- Using Kitty
local term = os.getenv("TERM")
return term and string.find(term, "kitty")
end,
}
+17
View File
@@ -0,0 +1,17 @@
-- -----------------------------------------------------------------------------
-- ---------------------------- kitty-scrollback -------------------------------
-- -----------------------------------------------------------------------------
return {
"mikesmithgh/kitty-scrollback.nvim",
enabled = true,
lazy = true,
cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" },
event = { "User KittyScrollbackLaunch" },
-- version = '*', -- latest stable version, may have breaking changes if major version changed
-- version = '^5.0.0', -- pin major version, include fixes and features that do not have breaking changes
config = function()
if vim.env.KITTY_SCROLLBACK_NVIM == "true" then
require("kitty-scrollback").setup()
end
end,
}
+8
View File
@@ -0,0 +1,8 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- Persistence ---------------------------------
-- -----------------------------------------------------------------------------
return {
"folke/persistence.nvim",
event = "BufReadPre",
opts = {},
}
+13
View File
@@ -0,0 +1,13 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- remote-nvim ---------------------------------
-- -----------------------------------------------------------------------------
return {
"amitds1997/remote-nvim.nvim",
version = "*", -- Pin to GitHub releases
dependencies = {
"nvim-lua/plenary.nvim", -- For standard functions
"MunifTanjim/nui.nvim", -- To build the plugin UI
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
},
config = true,
}
+85
View File
@@ -0,0 +1,85 @@
-- -----------------------------------------------------------------------------
-- ------------------------------ SmoothCursor ---------------------------------
-- -----------------------------------------------------------------------------
return {
"gen740/SmoothCursor.nvim",
config = function()
require("smoothcursor").setup({
type = "default",
cursor = "",
texthl = "SmoothCursor",
fancy = {
enable = true, -- enable fancy mode
head = { cursor = "", texthl = nil, linehl = nil },
body = {},
tail = { false }, -- false to disable fancy tail
},
matrix = { -- Loaded when 'type' is set to "matrix"
head = {
cursor = require("smoothcursor.matrix_chars"),
texthl = {
"SmoothCursor",
},
linehl = nil, -- No line highlight for the head
},
body = {
length = 6, -- Specifies the length of the cursor body
cursor = require("smoothcursor.matrix_chars"),
texthl = {
"SmoothCursorGreen",
},
},
tail = {
cursor = nil,
texthl = {
"SmoothCursor",
},
},
unstop = false,
},
autostart = true, -- Automatically start SmoothCursor
always_redraw = true, -- Redraw the screen on each update
flyin_effect = nil, -- Choose "bottom" or "top" for flying effect
speed = 25, -- Max speed is 100 to stick with your current position
intervals = 35, -- Update intervals in milliseconds
priority = 10, -- Set marker priority
timeout = 3000, -- Timeout for animations in milliseconds
threshold = 3, -- Animate only if cursor moves more than this many lines
max_threshold = 2000, -- If you move more than this many lines, don't animate (if `nil`, deactivate check)
disable_float_win = false, -- Disable in floating windows
enabled_filetypes = nil, -- Enable only for specific file types, e.g., { "lua", "vim" }
disabled_filetypes = nil, -- Disable for these file types
show_last_positions = nil,
})
-- Define cursor color/icon based on mode
local autocmd = vim.api.nvim_create_autocmd
autocmd({ "ModeChanged", "BufEnter" }, {
callback = function()
local current_mode = vim.fn.mode()
if current_mode == "n" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#8aa8f3" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "v" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "V" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#d298eb" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#bf616a" })
vim.fn.sign_define("smoothcursor", { text = "" })
elseif current_mode == "i" then
vim.api.nvim_set_hl(0, "SmoothCursor", { fg = "#9bd482" })
vim.fn.sign_define("smoothcursor", { text = "" })
end
end,
})
-- Define last cursor position icon
vim.fn.sign_define("smoothcursor_n", { text = "" })
vim.fn.sign_define("smoothcursor_v", { text = "" })
vim.fn.sign_define("smoothcursor_V", { text = "" })
vim.fn.sign_define("smoothcursor_i", { text = "" })
vim.fn.sign_define("smoothcursor_", { text = "" })
vim.fn.sign_define("smoothcursor_R", { text = "󰊄" })
end,
}
+10
View File
@@ -0,0 +1,10 @@
-- -----------------------------------------------------------------------------
-- -------------------------- telescope-fzf-native -----------------------------
-- -----------------------------------------------------------------------------
return {
"nvim-telescope/telescope-fzf-native.nvim",
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release",
config = function()
require("telescope").load_extension("fzf")
end,
}
+51
View File
@@ -0,0 +1,51 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- ToggleTerm ----------------------------------
-- -----------------------------------------------------------------------------
return {
"akinsho/toggleterm.nvim",
version = false,
lazy = false,
config = function()
require("toggleterm").setup({
-- size can be a number or function which is passed the current terminal
size = function(term)
if term.direction == "horizontal" then
return 10
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end,
open_mapping = [[<c-\>]],
hide_numbers = true,
autochdir = true,
shade_terminals = false,
start_in_insert = true,
insert_mappings = true,
terminal_mappings = true,
persist_size = true,
persist_mode = true,
direction = "horizontal",
close_on_exit = true,
shell = vim.o.shell,
auto_scroll = true,
float_opts = {
border = "curved",
winblend = 3,
title_pos = "left",
},
winbar = {
enabled = true,
name_formatter = function(term) -- term: Terminal
return term.name
end,
},
})
-- Keybinds
vim.api.nvim_set_keymap(
"n",
"<c-/>",
":ToggleTerm<cr>",
{ noremap = true, desc = " Open Terminal" }
)
end,
}
+6
View File
@@ -0,0 +1,6 @@
-- -----------------------------------------------------------------------------
-- ------------------------------- Transparent ---------------------------------
-- -----------------------------------------------------------------------------
return {
"xiyaowong/transparent.nvim",
}