From f3046a78e436dd644ea5a9d7eb4685d65936601b Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Jul 2025 17:13:22 +0000 Subject: [PATCH] Added check for environment variable XDG_CONFIG_HOME --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index 30e171d..037c721 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,9 @@ +if vim.fn.expand("$XDG_CONFIG_HOME") == "$XDG_CONFIG_HOME" then + print("[XDG_CONFIG_HOME] environment variable not set, please set this environment variable for configuration to work") + print("press any key to close neovim") + vim.fn.getchar() + os.exit(1) +end package.path = vim.fn.expand("$XDG_CONFIG_HOME") .. "/nvim/?.lua;" .. package.path pcall(vim.api.nvim_exec, "language en_US", true)