瀏覽代碼

[Bugfix]: fixes custom autocommands not working (#1775)

Robin Kautz 3 年之前
父節點
當前提交
daa0b24a50
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lua/lvim/config/init.lua

+ 1 - 1
lua/lvim/config/init.lua

@@ -151,6 +151,7 @@ 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 "lvim.core.autocmds"
   config_path = config_path or self.get_user_config_path()
   local ok, err = pcall(dofile, config_path)
   if not ok then
@@ -163,7 +164,6 @@ function M:load(config_path)
 
   deprecation_notice()
 
-  local autocmds = require "lvim.core.autocmds"
   autocmds.define_augroups(lvim.autocommands)
 
   local settings = require "lvim.config.settings"