configs/nvim/lua/config/lazy.lua
Kacper Marzecki edbb40e97f asd
2025-10-20 16:55:47 +02:00

73 lines
2.8 KiB
Lua

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)
local spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.editor.fzf" },
{ import = "lazyvim.plugins.extras.editor.harpoon2" },
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
{ import = "lazyvim.plugins.extras.lang.elixir" },
-- show diffs in the sign column
{ import = "lazyvim.plugins.extras.editor.mini-diff" },
{ import = "lazyvim.plugins.extras.coding.mini-comment" },
{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
-- move chunks of code up and down
{ import = "lazyvim.plugins.extras.editor.mini-move" },
-- where am i in the code structure ?
{ import = "lazyvim.plugins.extras.editor.navic" },
-- outline view for symbols
{ import = "lazyvim.plugins.extras.editor.outline" },
-- task runner
{ import = "lazyvim.plugins.extras.editor.overseer" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
-- { import = "lazyvim.plugins.extras.ai.copilot" },
-- { import = "lazyvim.plugins.extras.test.core" },
}
table.insert(spec, { import = "plugins" })
require("lazy").setup({
spec = spec,
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = {} },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})