diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-08-11 10:32:32 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-08-11 10:32:32 +0800 |
commit | 52c24177d3df9520a244e22b8dbf3c1b5bb323dc (patch) | |
tree | e3f31d31a1131c2e45c54b5fb2b6c261a6d26bc1 /platform.lua | |
parent | ad58184e9e1a4d8e24e657a855bdc73d3ffb2f74 (diff) | |
download | lua-language-server-52c24177d3df9520a244e22b8dbf3c1b5bb323dc.zip |
update launch setting
Diffstat (limited to 'platform.lua')
-rw-r--r-- | platform.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/platform.lua b/platform.lua index e984a272..42d4b706 100644 --- a/platform.lua +++ b/platform.lua @@ -9,21 +9,18 @@ local function findExePath() end local exePath = findExePath() -local exeDir = exePath:match('(.+)[/\\][%w_.-]+$') local dll = package.cpath:match '[/\\]%?%.([a-z]+)' -package.cpath = ('%s/?.%s'):format(exeDir, dll) -local ok, err = package.loadlib(exeDir..'/bee.'..dll, 'luaopen_bee_platform') +local bee = package.searchpath('bee', package.cpath) +local ok, err = package.loadlib(bee, 'luaopen_bee_platform') if not ok then error(([[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build errorMsg: %s exePath: %s -exeDir: %s dll: %s cpath: %s ]]):format( err, exePath, - exeDir, dll, package.cpath )) |