mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 10:35:08 +02:00
[Bugfix] Load user's autocmd custom_groups (#1393)
* Require core.autocmds before sourcing user config * Define augroups after sourcing user config
This commit is contained in:
parent
00b895d9e9
commit
a83fffdc80
2 changed files with 4 additions and 3 deletions
3
init.lua
3
init.lua
|
@ -21,9 +21,6 @@ local config = require "config"
|
|||
config:init()
|
||||
config:load()
|
||||
|
||||
local autocmds = require "core.autocmds"
|
||||
autocmds.define_augroups(lvim.autocommands)
|
||||
|
||||
local plugins = require "plugins"
|
||||
local plugin_loader = require("plugin-loader").init()
|
||||
plugin_loader:load { plugins, lvim.plugins }
|
||||
|
|
|
@ -27,6 +27,8 @@ end
|
|||
--- Override the configuration with a user provided one
|
||||
-- @param config_path The path to the configuration overrides
|
||||
function M:load(config_path)
|
||||
local autocmds = require "core.autocmds"
|
||||
|
||||
config_path = config_path or self.path
|
||||
local ok, err = pcall(vim.cmd, "luafile " .. config_path)
|
||||
if not ok then
|
||||
|
@ -37,6 +39,8 @@ function M:load(config_path)
|
|||
|
||||
self.path = config_path
|
||||
|
||||
autocmds.define_augroups(lvim.autocommands)
|
||||
|
||||
local settings = require "config.settings"
|
||||
settings.load_commands()
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue