File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -1626,6 +1626,14 @@ static bool InitGlobalScope() {
16261626 // "onlyFuncs" is used to get only functions when a ':' is typed since it
16271627 // can only access functions
16281628 luaL_dostring (luaState, R"(
1629+ local function PackagePaths()
1630+ local md = npp:GetPluginsConfigDir() .. [[\LuaScriptLibs\]]
1631+ local cp = md.."?.dll;"..md.."?\\loadall.dll"
1632+ local lp = md.."lua\\?.lua;"..md.."lua\\?\\init.lua;"..md.."?.lua;"..md.."?\\init.lua"
1633+ return lp, cp
1634+ end
1635+ package.path, package.cpath = PackagePaths()
1636+
16291637function GetAutoComplete(object, onlyFuncs)
16301638 local function GetKeys(tbl, list, onlyFuncs)
16311639 if type(tbl) == "table" then
Original file line number Diff line number Diff line change 185185** In Windows, any exclamation mark ('!') in the path is replaced by the
186186** path of the directory of the executable file of the current process.
187187*/
188- #define LUA_LSDIR "!\\plugins\\LuaScript\\"
189- #define LUA_CDIR LUA_LSDIR"lib\\"
190- #define LUA_LDIR LUA_CDIR"lua\\"
191- #define LUA_PATH_DEFAULT \
192- LUA_LDIR"?.lua;" LUA_LDIR"?\\init.lua;" \
193- LUA_CDIR"?.lua;" LUA_CDIR"?\\init.lua"
194- #define LUA_CPATH_DEFAULT \
195- LUA_CDIR"?.dll;" LUA_CDIR"?\\loadall.dll"
188+
189+ #define LUA_PATH_DEFAULT ""
190+ #define LUA_CPATH_DEFAULT ""
196191
197192#else /* }{ */
198193
You can’t perform that action at this time.
0 commit comments