diff options
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,9 +1,11 @@ -if os.getenv "LUNARVIM_RUNTIME_DIR" then - local path_sep = vim.loop.os_uname().version:match "Windows" and "\\" or "/" - vim.opt.rtp:append(os.getenv "LUNARVIM_RUNTIME_DIR" .. path_sep .. "lvim") +local init_path = debug.getinfo(1, "S").source:sub(2) +local base_dir = init_path:match("(.*[/\\])"):sub(1, -2) + +if not vim.tbl_contains(vim.opt.rtp:get(), base_dir) then + vim.opt.rtp:append(base_dir) end -require("lvim.bootstrap"):init() +require("lvim.bootstrap"):init(base_dir) require("lvim.config"):load() |