mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
Full refactor of codebase and usage of lazyvim opts setting. Also split code in custom plugins
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user