From 8a72226b4837ff6e3e28b74fc968047121350df8 Mon Sep 17 00:00:00 2001 From: Matthew Leong Date: Tue, 10 Jan 2023 09:31:46 -0800 Subject: [PATCH] fix: user config error if doesn't exits --- lua/cosmic/core/user.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/cosmic/core/user.lua b/lua/cosmic/core/user.lua index 033a402..11d1c03 100644 --- a/lua/cosmic/core/user.lua +++ b/lua/cosmic/core/user.lua @@ -1,5 +1,9 @@ -- DEFAULT USER SETTINGS -local user_config = require('cosmic.config.config') +local ok, user_config = pcall(require, 'cosmic.config.config') + +if not ok then + user_config = {} +end local default_config = { border = 'rounded',