1

Use relative path for nvim config bootstrap

This commit is contained in:
2024-06-02 04:23:10 +02:00
parent 2396bd4fea
commit fd494fafc5

View File

@ -1,2 +1,11 @@
local addRelPath = function(dir)
local spath = debug.getinfo(1, "S").source:sub(2):gsub("^([^/])", "./%1"):gsub("[^/]*$", "")
dir = dir and (dir .. "/") or ""
spath = spath .. dir
package.path = spath .. "?.lua;" .. spath .. "?/init.lua" .. package.path
end
addRelPath()
require("bootstrap") require("bootstrap")
require("config") require("config")