lua-language-server
lua-language-server copied to clipboard
search path is not change for the require command whn i configure the relative extension's paths
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Libraries
Expected Behaviour
I wrote the following code:
local cjson = require 'posix.unistd' print(type(cjson)) a = {} print("aaaa") from command line it is running perfectly my LUA_PATH =
/usr/local/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?/init.lua;/usr/local/lib/lua/5.4/?.lua;/usr/local/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua
my LUA_CPATH = /usr/local/lib/lua/5.4/?.so;/usr/local/lib/lua/5.4/loadall.so;./?.so
LUA Runtime setting for the extension is as:
?.lua
?/init.lua
/usr/local/share/lua/5.4/?.lua;
/usr/local/share/lua/5.4/?/init.lua;
/usr/local/lib/lua/5.4/?.lua;
/usr/local/lib/lua/5.4/?/init.lua;
./?.lua;
./?/init.lua
LUA workspace library /usr/local/lib/lua/5.4/?.so; /usr/local/lib/lua/5.4/loadall.so; ./?.so when i am running or debugging the program it still searches the workspace folder, any suggestion?
Actual Behaviour
It should change the searching directory prior running to .so paths
Reproduction steps
- Go to '...'
- code editor
- write an include statement
- Click '...'
- run or debug
- See error '...'
-
module 'posix.unistd' not found: no field package.preload['posix.unistd'] no file '/home/konstantinos/Desktop/server/lua-apps/posix/unistd.lua' no file '/home/konstantinos/Desktop/server/lua-apps/posix/unistd.lua' no file '/home/konstantinos/Desktop/server/lua-apps/posix/unistd.so' no file '/home/konstantinos/Desktop/server/lua-apps/posix/unistd.so' no file '/home/konstantinos/Desktop/server/lua-apps/posix.so' no file '/home/konstantinos/Desktop/server/lua-apps/posix.so'
Additional Notes
error loading module 'posix.unistd' from file '/usr/local/bin/lua': /usr/local/bin/lua:1: unexpected symbol near '<\127>'
Log File
No response