clean config

This commit is contained in:
Harivansh Rathi 2026-02-20 22:34:08 -05:00
parent 1db6db7f92
commit 25aded9685
19 changed files with 468 additions and 852 deletions

View file

@ -1,49 +1,59 @@
-- Set leader keys before lazy
vim.g.mapleader = " "
vim.g.maplocalleader = ","
vim.g.mapleader = ' '
vim.g.maplocalleader = ','
-- Global mapping helpers
_G.map = function(mode, lhs, rhs, opts)
opts = opts or {}
opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts)
function _G.map(mode, lhs, rhs, opts)
vim.keymap.set(mode, lhs, rhs, vim.tbl_extend('keep', opts or {}, { silent = true }))
end
_G.bmap = function(buf, mode, lhs, rhs, opts)
opts = opts or {}
opts.buffer = buf
opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts)
function _G.bmap(mode, lhs, rhs, opts)
_G.map(mode, lhs, rhs, vim.tbl_extend('force', opts or {}, { buffer = 0 }))
end
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
local disabled_plugins = {
'2html_plugin',
'bugreport',
'getscript',
'getscriptPlugin',
'gzip',
'logipat',
'matchit',
'matchparen',
'netrw',
'netrwFileHandlers',
'netrwPlugin',
'netrwSettings',
'optwin',
'rplugin',
'rrhelper',
'synmenu',
'tar',
'tarPlugin',
'tohtml',
'tutor',
'vimball',
'vimballPlugin',
'zip',
'zipPlugin',
}
for _, plugin in ipairs(disabled_plugins) do
vim.g['loaded_' .. plugin] = 1
end
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.uv.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'--branch=stable',
'https://github.com/folke/lazy.nvim.git',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Load plugins
require("lazy").setup("plugins", {
defaults = { lazy = true },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"zipPlugin",
},
},
},
require('lazy').setup('plugins', {
defaults = { lazy = false },
change_detection = { enabled = false },
})