From db18d5f356abbae43c7f1bda0dbfd4a51dc8e2c9 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 28 Apr 2022 04:03:48 +0530 Subject: [PATCH] add better way to change default options check http://localhost:3000/config/Custom%20config#change-default-options --- lua/core/default_config.lua | 4 ++-- lua/core/options.lua | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 6515d83..88f2d71 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -5,9 +5,9 @@ local M = {} M.options = { - path = "", -- path to file that overrides core.options + -- load your options here or load module with options1 + user = function() end, - -- NvChad options nvChad = { -- updater update_url = "https://github.com/NvChad/NvChad", diff --git a/lua/core/options.lua b/lua/core/options.lua index 6b731b4..d64494f 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -82,8 +82,4 @@ vim.schedule(function() end) -- load user options if the file exists - -local load_ifExists = require("core.utils").load_ifExists -local user_options = require("core.utils").load_config().options.path - -load_ifExists(user_options) +require("core.utils").load_config().options.user()