From 6a1732982287ef5aff2a6de171192b9e2bb90758 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 6 Sep 2021 21:53:56 +0200 Subject: Updates to nvim from lvim --- .config/nvim/lua/config/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.config/nvim/lua/config/init.lua') 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 -- cgit v1.2.3-70-g09d2