We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f76dd46 commit ce6fd55Copy full SHA for ce6fd55
1 file changed
lua/core/global.lua
@@ -1,14 +1,15 @@
1
local global = {}
2
local os_name = vim.uv.os_uname().sysname
3
+local realpath = vim.uv.fs_realpath
4
5
function global:load_variables()
6
self.is_mac = os_name == "Darwin"
7
self.is_linux = os_name == "Linux"
8
self.is_windows = os_name == "Windows_NT"
9
self.is_wsl = vim.fn.has("wsl") == 1
- self.vim_path = vim.fn.stdpath("config")
10
- self.cache_dir = vim.fn.stdpath("cache")
11
- self.data_dir = string.format("%s/site/", vim.fn.stdpath("data"))
+ self.vim_path = realpath(vim.fn.stdpath("config"))
+ self.cache_dir = realpath(vim.fn.stdpath("cache"))
12
+ self.data_dir = string.format("%s/site/", realpath(vim.fn.stdpath("data")))
13
self.modules_dir = self.vim_path .. "/modules"
14
self.home = self.is_windows and vim.env.USERPROFILE or vim.env.HOME
15
end
0 commit comments