Closed AmjadHD closed 5 years ago
I want to try it out in sublime text via it's LSP client.
You can install it in VSCode, then copy the server
folder.
The way to start the service can be referred to here: https://github.com/sumneko/lua-language-server/blob/master/client/src/extension.ts
I tried with this command:
[
"D:/Downloads/Archives/sumneko.lua-0.9.7/extension/server/bin/lua-language-server",
"-E",
"-e",
"LANG=\"en-US\"",
"D:/Downloads/Archives/sumneko.lua-0.9.7/extension/server/main.lua"
],
but I failed, this is the client's log:
LSP: global configs ['polymer-ide=False', 'ocaml=False', 'vscode-json=True', 'javascript-typescript-langserver=False', 'jdtls=True', 'typescript-language-server=False', 'lsp-tsserver=True', 'pyls=True', 'vscode-css=True', 'metals=False', 'haskell-ide-engine=False', 'clangd=False', 'eslint=False', 'reason=False', 'phpls=False', 'vscode-html=True', 'cquery=False', 'rls=True', 'gopls=False', 'bashls=False', 'golsp=False', 'kotlinls=True', 'lua-ls=True', 'xml-ls=True', 'mspyls=False', 'julials=False']
LSP: window 2 starting 1 initial views
LSP: window 2 requests lua-ls for D:\Downloads\Archives\sumneko.lua-0.9.7\extension\server\main.lua
LSP: starting in C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\hover-preview
LSP: starting ['D:/Downloads/Archives/sumneko.lua-0.9.7/extension/server/bin/lua-language-server', '-E', '-e', 'LANG="en-US"', 'D:/Downloads/Archives/sumneko.lua-0.9.7/extension/server/main.lua']
LSP: --> initialize
LSP: window 2 added session lua-ls
server: D:/Downloads/Archives/sumneko.lua-0.9.7/extension/server/bin/lua-language-server: ...ads/Archives/sumneko.lua-0.9.7/extension/server/main.lua:13: module 'log' not found:
server: no field package.preload['log']
server: no file 'C:/Users/Lehdhili/AppData/Roaming/Sublime Text 3/Packages/hover-preview/src/log.lua'
server: no file 'C:/Users/Lehdhili/AppData/Roaming/Sublime Text 3/Packages/hover-preview/src/log/init.lua'
server: no file 'D:\Downloads\Archives\sumneko.lua-0.9.7\extension\server\bin\log.dll'
server: no file 'D:\Downloads\Archives\sumneko.lua-0.9.7\extension\server\bin\..\lib\lua\5.4\log.dll'
server: no file 'D:\Downloads\Archives\sumneko.lua-0.9.7\extension\server\bin\loadall.dll'
server: no file '.\log.dll'
server: stack traceback:
server: [C]: in function 'require'
server: ...ads/Archives/sumneko.lua-0.9.7/extension/server/main.lua:13: in main chunk
server: [C]: in ?
LSP: LSP stream logger stopped.
LSP: LSP stdout process ended.
Please update the script manually and try again.
Thanks 👍 , that did it, I already tried to monkey-patch main.lua and set ROOT
to the server path hoping to fix it, but Lua is not my cop of tea 😄 .
You could just install it in VSCode. Search
Lua
in Extension page, then you can see it which publisher issumneko
. If you always want to get the latest version as soon as possible, You just need to update lua files manually. Did you have other requirements for compiling your own version on Windows?