feat(neovim): use built-in package manager.

This commit is contained in:
CronyAkatsuki 2025-10-20 18:51:25 +02:00
parent 3b5eceb42f
commit 1f52e22b17
11 changed files with 50 additions and 101 deletions

3
lua/config/init.lua Normal file
View file

@ -0,0 +1,3 @@
require('config.settings')
require('config.keybindings')
require('config.pack')

View file

@ -1,45 +0,0 @@
-- Bootstrap lazy.nvim
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"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
--setup lazy.nvim
require("lazy").setup({
spec = {
-- import plugins from specific directory
{ import = "plugins" },
},
-- setup correct colorscheme
install = { colorscheme = { "gruvbox"} },
-- automatically check for plugin updates
checker = { enabled = true },
rocks = {
enabled = false
},
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

5
lua/config/pack.lua Normal file
View file

@ -0,0 +1,5 @@
vim.pack.add({
{src = "https://github.com/ellisonleao/gruvbox.nvim"},
{src = "https://github.com/nvim-treesitter/nvim-treesitter"},
{src = "https://github.com/neovim/nvim-lspconfig"},
})

View file

@ -26,6 +26,5 @@ vim.opt.inccommand = "split"
-- ignore case
vim.opt.ignorecase = true
-- setup leader and local leader
vim.g.mapleader = " "
vim.g.maplocalleader = ";"
-- disable neovim swap files
vim.opt.swapfile = false