This commit is contained in:
sankalp committed 2024-08-22 07:38:23 +05:45
1 parent a13ea6d3a9
commit 6224efd4a8
30 files changed
+2144 -3784

No files matched your search

+94 -81
View File
@@ -1,95 +1,108 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
---@diagnostic disable-next-line: undefined-field
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
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'--single-branch',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.opt.runtimepath:prepend(lazypath)
require('lazy').setup({
spec = {
{ import = 'plugins' },
},
install = {
missing = true,
colorscheme = { 'moonfly' },
},
checker = {
enabled = true,
notify = false,
},
change_detection = {
enabled = true,
notify = false,
},
ui = {
icons = {
cmd = '',
config = '',
event = '',
ft = '',
init = '',
import = '',
keys = '',
lazy = '󰒲 ',
loaded = '●',
not_loaded = '○',
plugin = '',
runtime = '',
require = '󰢱 ',
source = '',
start = '',
task = '✔ ',
list = {
'●',
'➜',
'★',
'‒',
},
},
},
local status_ok, lazy = pcall(require, 'lazy')
if not status_ok then
return
end
local icons = require('lib.icons')
lazy.setup({
root = vim.fn.stdpath('data') .. '/lazy',
defaults = { lazy = true },
spec = 'plugins',
lockfile = vim.fn.stdpath('config') .. '/lua/lock.json',
concurrency = 8,
dev = { path = '~/Projects/GitHub/', patterns = {}, fallback = false },
install = { missing = true, colorscheme = { 'onedark' } },
git = {
log = { '--since=3 days ago' },
timeout = 120,
url_format = 'https://github.com/%s.git',
filter = true,
},
ui = {
size = { width = 0.9, height = 0.8 },
wrap = true,
border = 'rounded',
icons = {
cmd = icons.ui.Terminal,
config = icons.ui.Gear,
event = icons.ui.Electric,
ft = icons.documents.File,
init = icons.ui.Rocket,
import = icons.documents.Import,
keys = icons.ui.Keyboard,
lazy = icons.ui.Sleep,
loaded = icons.ui.CircleSmall,
not_loaded = icons.ui.CircleSmallEmpty,
plugin = icons.ui.Package,
runtime = icons.ui.Neovim,
source = icons.ui.Code,
start = icons.ui.Play,
task = icons.ui.Check,
list = {
icons.ui.CircleSmall,
icons.ui.Arrow,
icons.ui.Star,
icons.ui.Minus,
},
},
browser = nil,
throttle = 20,
custom_keys = {
['<localleader>l'] = function(plugin)
require('lazy.util').float_term({ 'lazygit', 'log' }, {
cwd = plugin.dir,
})
end,
['<localleader>t'] = function(plugin)
require('lazy.util').float_term(nil, {
cwd = plugin.dir,
})
end,
},
},
diff = { cmd = 'git' },
checker = { enabled = false, concurrency = nil, notify = true, frequency = 3600 },
change_detection = { enabled = true, notify = true },
performance = {
cache = { enabled = true },
reset_packpath = true,
rtp = {
reset = true,
paths = {},
disabled_plugins = {
'2html_plugin',
'tohtml',
'getscript',
'getscriptPlugin',
'gzip',
'logipat',
'netrw',
'netrwPlugin',
'netrwSettings',
'netrwFileHandlers',
'matchit',
'tar',
'tarPlugin',
'rrhelper',
'spellfile_plugin',
'vimball',
'vimballPlugin',
'zip',
'zipPlugin',
'tutor',
'rplugin',
'syntax',
'synmenu',
'optwin',
'compiler',
'bugreport',
'ftplugin',
'tohtml',
-- 'tutor',
-- 'matchit',
-- 'matchparen',
-- 'netrwPlugin',
},
},
},
readme = {
root = vim.fn.stdpath('state') .. '/lazy/readme',
files = { 'README.md', 'lua/**/README.md' },
skip_if_doc_exists = true,
},
state = vim.fn.stdpath('state') .. '/lazy/state.json',
})