feat(config): custom module location for config

This commit is contained in:
vdbewout 2024-05-30 18:23:27 +00:00
parent 060f56d6d4
commit 139bf1333a
No known key found for this signature in database
GPG key ID: F4756403592D3E9F

View file

@ -20,6 +20,9 @@ local defaults = {
-- lazyvim.config.options can't be configured here since that's loaded before lazyvim setup -- lazyvim.config.options can't be configured here since that's loaded before lazyvim setup
-- if you want to disable loading options, add `package.loaded["lazyvim.config.options"] = true` to the top of your init.lua -- if you want to disable loading options, add `package.loaded["lazyvim.config.options"] = true` to the top of your init.lua
}, },
-- module containing autocmds, keymaps and options
---@type string
modname = "config",
news = { news = {
-- When enabled, NEWS.md will be shown when changed. -- When enabled, NEWS.md will be shown when changed.
-- This only contains big new features and breaking changes. -- This only contains big new features and breaking changes.
@ -249,7 +252,7 @@ function M.load(name)
if M.defaults[name] or name == "options" then if M.defaults[name] or name == "options" then
_load("lazyvim.config." .. name) _load("lazyvim.config." .. name)
end end
_load("config." .. name) _load(M.modname .. "." .. name)
if vim.bo.filetype == "lazy" then if vim.bo.filetype == "lazy" then
-- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here -- HACK: LazyVim may have overwritten options of the Lazy ui, so reset this here
vim.cmd([[do VimResized]]) vim.cmd([[do VimResized]])