📦 Better Lazy Config
- Use proper directory structure - Loading order improved
This commit is contained in:
@@ -49,8 +49,6 @@
|
||||
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Configuration ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
||||
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
||||
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
||||
-- --------------------------------- PRE-LOAD ----------------------------------
|
||||
require("config.preload")
|
||||
|
||||
-- ---------------------------------- LAZY -------------------------------------
|
||||
require("config.lazy")
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
-- -------------------------------- Commands -----------------------------------
|
||||
-- Make :Q close all of the buffers
|
||||
vim.api.nvim_create_user_command("Q", function()
|
||||
vim.cmd.bdelete()
|
||||
vim.cmd.qall()
|
||||
end, { force = true })
|
||||
|
||||
-- ------------------------------ Auto-Commands --------------------------------
|
||||
-- Autosave Colorscheme
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
desc = "Store colorscheme name",
|
||||
callback = function()
|
||||
print("colorscheme:", vim.g.colors_name)
|
||||
vim.fn.writefile(
|
||||
{ vim.g.colors_name },
|
||||
vim.fn.stdpath("config") .. "/.colorscheme"
|
||||
)
|
||||
end,
|
||||
})
|
||||
@@ -2,26 +2,6 @@
|
||||
-- -------------------------------- KEYBINDS -----------------------------------
|
||||
-- -----------------------------------------------------------------------------
|
||||
|
||||
-- -------------------------------- Commands -----------------------------------
|
||||
-- Make :Q close all of the buffers
|
||||
vim.api.nvim_create_user_command("Q", function()
|
||||
vim.cmd.bdelete()
|
||||
vim.cmd.qall()
|
||||
end, { force = true })
|
||||
|
||||
-- ------------------------------ Auto-Commands --------------------------------
|
||||
-- Autosave Colorscheme
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
desc = "Store colorscheme name",
|
||||
callback = function()
|
||||
print("colorscheme:", vim.g.colors_name)
|
||||
vim.fn.writefile(
|
||||
{ vim.g.colors_name },
|
||||
vim.fn.stdpath("config") .. "/.colorscheme"
|
||||
)
|
||||
end,
|
||||
})
|
||||
|
||||
-- --------------------------------- Keymaps -----------------------------------
|
||||
local wk = require("which-key")
|
||||
wk.add({
|
||||
@@ -1,8 +1,10 @@
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- -------------------------------- PRE-LOAD -----------------------------------
|
||||
-- --------------------------------- OPTIONS -----------------------------------
|
||||
-- -----------------------------------------------------------------------------
|
||||
|
||||
-- Set Default Leader Key
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Restore Leader Key
|
||||
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.leader") == 1 then
|
||||
-- Load Stored Leader Key
|
||||
@@ -19,3 +21,13 @@ else
|
||||
KITTY_THEME = os.getenv("KITTY_THEME")
|
||||
end
|
||||
end
|
||||
|
||||
-- ----------------------------------- LSP --------------------------------------
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.lazyvim_python_lsp = "basedpyright"
|
||||
|
||||
-- ------------------------------- CLIENT APPS ---------------------------------
|
||||
if vim.g.neovide then
|
||||
-- ----------------------- Neovide -------------------------
|
||||
require("config.neovide")
|
||||
end
|
||||
+9
-17
@@ -1,20 +1,12 @@
|
||||
-- -----------------------------------------------------------------------------
|
||||
-- --------------------------------- OPTIONS -----------------------------------
|
||||
-- ---------------------------------- USER -------------------------------------
|
||||
-- -----------------------------------------------------------------------------
|
||||
|
||||
-- ----------------------------------- 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")
|
||||
----------- Apply the colorscheme -----------
|
||||
-- 1. Restore last colorscheme if it exists
|
||||
-- 2. Use kitty theme if it exists
|
||||
-- 3. Fallback to Catppuccin Frappe
|
||||
-- 4. Fallback to Tokyonight
|
||||
vim.cmd.colorscheme(
|
||||
STORED_THEME or KITTY_THEME or "catppuccin-frappe" or "tokyonight"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user