📦 Better Lazy Config
- Use proper directory structure - Loading order improved
This commit is contained in:
@@ -49,8 +49,6 @@
|
|||||||
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Configuration ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ Configuration ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
||||||
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
||||||
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
-- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
|
||||||
-- --------------------------------- PRE-LOAD ----------------------------------
|
|
||||||
require("config.preload")
|
|
||||||
|
|
||||||
-- ---------------------------------- LAZY -------------------------------------
|
-- ---------------------------------- LAZY -------------------------------------
|
||||||
require("config.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 -----------------------------------
|
-- -------------------------------- 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 -----------------------------------
|
-- --------------------------------- Keymaps -----------------------------------
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.add({
|
wk.add({
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
-- -------------------------------- PRE-LOAD -----------------------------------
|
-- --------------------------------- OPTIONS -----------------------------------
|
||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Set Default Leader Key
|
-- Set Default Leader Key
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
-- Restore Leader Key
|
-- Restore Leader Key
|
||||||
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.leader") == 1 then
|
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.leader") == 1 then
|
||||||
-- Load Stored Leader Key
|
-- Load Stored Leader Key
|
||||||
@@ -19,3 +21,13 @@ else
|
|||||||
KITTY_THEME = os.getenv("KITTY_THEME")
|
KITTY_THEME = os.getenv("KITTY_THEME")
|
||||||
end
|
end
|
||||||
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 ------------------------------------
|
-- ---------------------------------- STYLE ------------------------------------
|
||||||
-- Apply the colorscheme
|
----------- Apply the colorscheme -----------
|
||||||
vim.cmd.colorscheme(STORED_THEME or KITTY_THEME or "catppuccin-frappe")
|
-- 1. Restore last colorscheme if it exists
|
||||||
|
-- 2. Use kitty theme if it exists
|
||||||
-- ------------------------------- CLIENT APPS ---------------------------------
|
-- 3. Fallback to Catppuccin Frappe
|
||||||
if vim.g.neovide then
|
-- 4. Fallback to Tokyonight
|
||||||
-- ----------------------- Neovide -------------------------
|
vim.cmd.colorscheme(
|
||||||
require("config.neovide")
|
STORED_THEME or KITTY_THEME or "catppuccin-frappe" or "tokyonight"
|
||||||
end
|
)
|
||||||
|
|
||||||
-- -------------------------------- KEYBINDS -----------------------------------
|
|
||||||
require("config.keybinds")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user