dots/nvim/.config/nvim/init.lua
Harivansh Rathi 44176e60f9 Initial dotfiles setup with GNU stow
Centralize dotfiles from ~ into stow packages:
- zsh: .zshrc, .zshenv
- git: .gitconfig
- nvim: init.lua, lua/, plugin/, after/, lazy-lock.json
- tmux: tmux.conf, session-list.sh
- karabiner: karabiner.json
- ghostty: config.ghostty
- claude: CLAUDE.md, settings.json, settings.local.json, statusline.sh, 30 commands
2026-02-14 14:45:58 -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",
},
},
},
})