Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help with running lua lsp in a docker container #2718

Open
ankushKun opened this issue Jun 19, 2024 · 3 comments
Open

Need help with running lua lsp in a docker container #2718

ankushKun opened this issue Jun 19, 2024 · 3 comments

Comments

@ankushKun
Copy link

Hi, this is what I am trying to do:

  • I have a web editor made with react and monaco editor
  • The editor is for writing lua code
  • I want lua lsp autocompletions in the web editor
  • I am trying to run the lua-language-server in a docker container which I hope to later run on a VPS and make the editor frontend connect to this remote lsp server to provide autocompletions

Setup:

Issue faced:

When I run just the lua-language-server command, it seems to be running, but when I specify a socket, it does not start and gives a connection refused error.

image

image

moreover when I install the lsp on my mac machine and run the same command, it doesnot throw and error and seems to run silently

image

If anyone needs any additional details please let me know

Dockerfile:

# Use the official Homebrew Docker image as the base
FROM homebrew/brew:latest

# Install lua-language-server
RUN brew install lua-language-server

# Verify installation
RUN lua-language-server --version

# Set working directory
WORKDIR /workspace

# ENTRYPOINT ["lua-language-server --socket=5000"]

# CMD ["lua-language-server", "--socket=5000"]

EXPOSE 5000

CMD ["bash"]

tried both ENTRYPOINT and CMD, same results, which is why I used bash and interactive mode to debug

Thanks

@CppCXY
Copy link
Contributor

CppCXY commented Jun 19, 2024

Even if it is connected through a socket, luals must be in the same place as the runtime environment., because if the language server and the target workspace are not on the same machine, the language server cannot correctly load the workspace. LSP does not specify how to send workspace content to the LS, so general language server load the workspace by scanning the rootPath path passed in by LSP client. Currently, to truly support WebIDE, LuaLs must be compiled into wasm. There are no plans or progress in this regard at the moment.

@ankushKun
Copy link
Author

I see.

Currently, to truly support WebIDE, LuaLs must be compiled into wasm

Could you point me to any resources regarding this? if any

@CppCXY
Copy link
Contributor

CppCXY commented Jun 19, 2024

Could you point me to any resources regarding this? if any

discuss in #1689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants