Added check for environment variable XDG_CONFIG_HOME

This commit is contained in:
root
2025-07-25 17:13:22 +00:00
parent 756d6620de
commit f3046a78e4
+6
View File
@@ -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)