🧠 Reorganize packaging

- Better organized and more efficient
This commit is contained in:
2024-07-16 14:37:11 -04:00
parent 0648c5d38b
commit fcfb8e6e00
13 changed files with 185 additions and 91 deletions
+1
View File
@@ -0,0 +1 @@
+1 -1
View File
@@ -658,4 +658,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
+5 -51
View File
@@ -49,57 +49,11 @@
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Configuration ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ -- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Configuration ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ -- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ -- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
-- --------------------------------- PRE-LOAD ----------------------------------
require("config.preload")
-- ---------------------------------- LAZY ------------------------------------- -- ---------------------------------- LAZY -------------------------------------
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" require("config.lazy")
-- Bootstrap lazy.nvim
if not vim.uv.fs_stat(lazypath) then
-- stylua: ignore
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", lazypath
})
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
-- -------------------------------- DISABLED ----------------------------------- -- ---------------------------------- USER -------------------------------------
vim.g.loaded_perl_provider = 0 require("config.user")
-- --------------------------------- PLUGINS -----------------------------------
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "ui" },
{ import = "plugins" },
{ import = "themes" },
},
defaults = { lazy = false, version = false },
checker = { enabled = true },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
-- ---------------------------------- STYLE ------------------------------------
require("config/style")
-- ------------------------------- CLIENT APPS ---------------------------------
if vim.g.neovide then
-- ----------------------- Neovide -------------------------
require("config/neovide")
end
-- -------------------------------- KEYBINDS -----------------------------------
require("config/keybinds")
+1 -1
View File
@@ -221,4 +221,4 @@ wk.add({
}) })
-- ---------------------------- Spell Correction ------------------------------- -- ---------------------------- Spell Correction -------------------------------
require("config/spellcheck") require("config.spellcheck")
+40
View File
@@ -0,0 +1,40 @@
-- -----------------------------------------------------------------------------
-- ---------------------------------- LAZY -------------------------------------
-- -----------------------------------------------------------------------------
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
-- stylua: ignore
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", lazypath
})
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
-- --------------------------------- PLUGINS -----------------------------------
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "ui" },
{ import = "plugins" },
{ import = "themes" },
},
defaults = { lazy = false, version = false },
checker = { enabled = true },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
+4 -1
View File
@@ -1,6 +1,8 @@
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- --------------------------------- NeoVide ----------------------------------- -- --------------------------------- NeoVide -----------------------------------
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Set GUI font
vim.opt.guifont = "Iosevka:#e-subpixelantialias:h12"
-- refresh rate and translucency -- refresh rate and translucency
vim.g.neovide_refresh_rate = 170 vim.g.neovide_refresh_rate = 170
vim.g.neovide_transparency = 0.85 vim.g.neovide_transparency = 0.85
@@ -39,4 +41,5 @@ vim.cmd(":cnoremap <silent> <C-v> <C-r>+")
vim.cmd(":cnoremap <silent> <C-c> <C-r>+") vim.cmd(":cnoremap <silent> <C-c> <C-r>+")
-- and in insert mode -- and in insert mode
vim.cmd(":inoremap <silent> <C-v> <C-r>+") vim.cmd(":inoremap <silent> <C-v> <C-r>+")
vim.cmd(":inoremap <silent> <C-c> <C-r>+") vim.cmd(":inoremap <silent> <C-c> <C-r>+")
+10 -11
View File
@@ -1,8 +1,16 @@
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- ---------------------------------- Style ------------------------------------ -- -------------------------------- PRE-LOAD -----------------------------------
-- ----------------------------------------------------------------------------- -- -----------------------------------------------------------------------------
-- Restore Leader Key
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.leader") == 1 then
-- Load Stored Leader Key
vim.g.mapleader = vim.fn.readfile(vim.fn.stdpath("config") .. "/.leader")[1]
else
-- Set Default Leader Key
vim.g.mapleader = " "
end
-- Restore Colorscheme -- Restore Colorscheme to variable
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.colorscheme") == 1 then if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.colorscheme") == 1 then
-- Load the stored colorscheme -- Load the stored colorscheme
STORED_THEME = vim.fn.readfile(vim.fn.stdpath("config") .. "/.colorscheme")[1] STORED_THEME = vim.fn.readfile(vim.fn.stdpath("config") .. "/.colorscheme")[1]
@@ -13,12 +21,3 @@ else
end end
end end
-- Apply the colorscheme
vim.cmd.colorscheme(STORED_THEME or KITTY_THEME or "catppuccin-frappe")
-- Set GUI font
vim.opt.guifont = "Iosevka:#e-subpixelantialias:h12"
vim.g.have_nerd_font = true
-- Set Leader Key
vim.g.mapleader = " "
+20
View File
@@ -0,0 +1,20 @@
-- -----------------------------------------------------------------------------
-- --------------------------------- OPTIONS -----------------------------------
-- -----------------------------------------------------------------------------
-- ----------------------------------- LSP --------------------------------------
vim.g.loaded_perl_provider = 0
vim.g.lazyvim_python_lsp = "basedpyright"
-- ---------------------------------- STYLE ------------------------------------
-- Apply the colorscheme
vim.cmd.colorscheme(STORED_THEME or KITTY_THEME or "catppuccin-frappe")
-- ------------------------------- CLIENT APPS ---------------------------------
if vim.g.neovide then
-- ----------------------- Neovide -------------------------
require("config.neovide")
end
-- -------------------------------- KEYBINDS -----------------------------------
require("config.keybinds")
+63
View File
@@ -4,8 +4,71 @@
return { return {
{ import = "lazyvim.plugins.extras.coding.codeium" }, { import = "lazyvim.plugins.extras.coding.codeium" },
{ import = "lazyvim.plugins.extras.coding.tabnine" },
{ import = "lazyvim.plugins.extras.coding.yanky" }, { import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" }, { import = "lazyvim.plugins.extras.coding.mini-surround" },
{ import = "lazyvim.plugins.extras.vscode" },
{
"echasnovski/mini.align",
config = function()
require("mini.align").setup()
end,
},
{ -- Emoji completion
"hrsh7th/nvim-cmp",
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
dependencies = { "hrsh7th/cmp-emoji" },
},
{ -- Supertab completion
-- Use <tab> for completion and snippets
"hrsh7th/nvim-cmp",
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
== nil
end
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
-- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior
cmp.select_next_item()
elseif vim.snippet.active({ direction = 1 }) then
vim.schedule(function()
vim.snippet.jump(1)
end)
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif vim.snippet.active({ direction = -1 }) then
vim.schedule(function()
vim.snippet.jump(-1)
end)
else
fallback()
end
end, { "i", "s" }),
})
end,
},
{ {
"norcalli/nvim-colorizer.lua", "norcalli/nvim-colorizer.lua",
config = function() config = function()
+16
View File
@@ -12,6 +12,22 @@ return {
"folke/which-key.nvim", "folke/which-key.nvim",
opts = { opts = {
preset = "modern", preset = "modern",
modes = {
n = true, -- Normal mode
i = true, -- Insert mode
x = true, -- Visual mode
s = true, -- Select mode
o = true, -- Operator pending mode
t = true, -- Terminal mode
c = true, -- Command mode
-- Start hidden and wait for a key to be pressed before showing the popup
-- Only used by enabled xo mapping modes.
-- Set to false to show the popup immediately (after the delay)
defer = {
["<C-V>"] = false,
V = false,
},
},
}, },
}, },
{ {
+1
View File
@@ -10,4 +10,5 @@ return {
{ import = "lazyvim.plugins.extras.lang.python" }, { import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.toml" }, { import = "lazyvim.plugins.extras.lang.toml" },
{ import = "lazyvim.plugins.extras.lang.yaml" }, { import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.lang.clangd" },
} }
-26
View File
@@ -1,26 +0,0 @@
-- -----------------------------------------------------------------------------
-- ----------------------------- 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")
local root = string.find(user, "root")
return not ssh and not root
end,
}
+23
View File
@@ -128,4 +128,27 @@ return {
}) })
end, end,
}, },
{
"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") or false
local user = os.getenv("USER") or ""
local root = string.find(user, "root")
return not ssh and not root
end,
},
} }