Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lua/core/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ function global:load_variables()
self.is_windows = os_name == "Windows_NT"
self.is_wsl = vim.fn.has("wsl") == 1
self.vim_path = vim.fn.stdpath("config")
local path_sep = self.is_windows and "\\" or "/"
local home = self.is_windows and os.getenv("USERPROFILE") or os.getenv("HOME")
self.cache_dir = home .. path_sep .. ".cache" .. path_sep .. "nvim" .. path_sep
self.modules_dir = self.vim_path .. path_sep .. "modules"
self.home = home
self.cache_dir = vim.fn.stdpath("cache")
self.data_dir = string.format("%s/site/", vim.fn.stdpath("data"))
self.modules_dir = self.vim_path .. "/modules"
self.home = self.is_windows and os.getenv("USERPROFILE") or os.getenv("HOME")
end

global:load_variables()
Expand Down