Initial Commit - Add nvim config
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
37
.config/nvim/init.lua
Normal file
37
.config/nvim/init.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
-- Leaders early so plugins see them
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- Bootstrap lazy.nvim (auto-install on first run)
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Collect plugin specs
|
||||
local plugins = {}
|
||||
|
||||
-- Core/global plugins
|
||||
vim.list_extend(plugins, require("core.plugins"))
|
||||
|
||||
-- NOTE: In the future, add language packs here.
|
||||
-- Example (loads only if the module exists):
|
||||
-- local ok, c_plugins = pcall(require, "c.plugins")
|
||||
-- if ok then vim.list_extend(plugins, c_plugins) end
|
||||
|
||||
local ok_c, c_plugins = pcall(require, "c.plugins")
|
||||
if ok_c then vim.list_extend(plugins, c_plugins) end
|
||||
|
||||
-- Set up plugins
|
||||
require("lazy").setup(plugins, {
|
||||
ui = { border = "rounded" },
|
||||
})
|
||||
|
||||
-- Editor config (numbers, etc.) and global keymaps
|
||||
require("core.config")
|
||||
require("core.keybindings")
|
||||
|
||||
require("c.config")
|
||||
require("c.keybindings")
|
||||
Reference in New Issue
Block a user