nvim: Refactor core setting loading into core module
Move everything pertinent from init.lua to the core module init file itself. For now the only thing remaining in the init lua is requiring the core.
This commit is contained in:
parent
78987c493e
commit
c27e697870
2 changed files with 13 additions and 21 deletions
|
@ -1,21 +1 @@
|
|||
-- many ideas for this config come from
|
||||
-- https://github.com/elianiva/dotfiles/ - with much gratitude
|
||||
local api = vim.api
|
||||
|
||||
api.nvim_exec2("runtime abbrev.vim", {})
|
||||
|
||||
for _, source in ipairs({
|
||||
"core.settings",
|
||||
"core.lazy",
|
||||
"core.autocmds",
|
||||
"core.mappings",
|
||||
"core.look",
|
||||
}) do
|
||||
local status_ok, fault = pcall(require, source)
|
||||
if not status_ok then
|
||||
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
|
||||
end
|
||||
end
|
||||
|
||||
-- to include e.g. the spell dictionaries for vim
|
||||
vim.opt.rtp:append(vim.fn.stdpath("data") .. "/site")
|
||||
require("core")
|
||||
|
|
12
nvim/.config/nvim/lua/core/init.lua
Normal file
12
nvim/.config/nvim/lua/core/init.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
for _, source in ipairs({
|
||||
"core.settings",
|
||||
"core.lazy",
|
||||
"core.autocmds",
|
||||
"core.mappings",
|
||||
"core.look",
|
||||
}) do
|
||||
local status_ok, fault = pcall(require, source)
|
||||
if not status_ok then
|
||||
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue