summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/config/init.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/config/init.lua')
-rw-r--r--.config/nvim/lua/config/init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/.config/nvim/lua/config/init.lua b/.config/nvim/lua/config/init.lua
index e6d6389..7d42ad1 100644
--- a/.config/nvim/lua/config/init.lua
+++ b/.config/nvim/lua/config/init.lua
@@ -1,5 +1,6 @@
+local home_dir = vim.loop.os_homedir()
local M = {
- path = string.format("%s/.config/nvim/config.lua", os.getenv "HOME"),
+ path = string.format("%s/.config/nvim/config.lua", home_dir),
}
--- Initialize nvim default configuration
@@ -19,6 +20,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 "core.autocmds"
config_path = config_path or self.path
local ok, err = pcall(vim.cmd, "luafile " .. config_path)
if not ok then
@@ -29,6 +31,8 @@ function M:load(config_path)
self.path = config_path
+ autocmds.define_augroups(options.autocommands)
+
local settings = require "config.settings"
settings.load_commands()
end