Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(global): cleanup legacy code #1296

Merged
merged 1 commit into from
Jun 18, 2024
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