Full refactor of codebase and usage of lazyvim opts setting. Also split code in custom plugins

This commit is contained in:
2025-08-29 12:30:41 +02:00
parent 524673abfc
commit e37215ae97
33 changed files with 1075 additions and 1381 deletions

View File

@@ -1,4 +1,4 @@
-- Bootstrap lazy.nvim
-- Bootstrap lazy manager first thing
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
@@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
@@ -15,34 +15,22 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
-- Must load before lazy
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
-- { import = "plugins" },
require("plugins")
-- Import all files in the plugin folder
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "gruvbox" } },
-- automatically check for plugin updates
-- Automatically check for plugin updates
checker = { enabled = false },
dev = {
path = "~/projects",
fallback = true,
},
change_detection = {
enabled = false, -- disable automatic reloading
notify = false, -- optional: also disable notification when it would reload
enabled = false,
},
})
-- after lazy did its job
require("helpers.after")