nvimconfig/init.lua
2025-08-10 20:39:20 +00:00

30 lines
590 B
Lua

local vim = _G["vim"]
package.path = package.path .. (";%s/.config/nvim/?.lua"):format(os.getenv("HOME"))
local gerr
local function check(ok, err)
if not ok then
gerr = err
end
end
check(pcall(require, "plugins"))
check(pcall(require, "options"))
check(pcall(require, "keys"))
check(pcall(require, "theme"))
local function loadSyntaxFiles(dir)
local files = vim.fn.globpath(dir, "*.vim", 0, 1)
for _, file in ipairs(files) do
vim.cmd("source " .. file)
end
end
local syntaxDir = vim.fn.stdpath("config") .. "/syntax"
loadSyntaxFiles(syntaxDir)
if gerr then
error(gerr)
end