nvim/init.lua
2026-02-04 23:36:08 -05:00

50 lines
1 KiB
Lua

-- Set leader keys before lazy
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)
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)
end
-- Bootstrap lazy.nvim
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,
})
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",
},
},
},
})