Closed mtekman closed 3 years ago
Hi @mtekman, to run the language server manually you have to run it with the -m
flag.
The steps would be:
git clone https://github.com/galaxyproject/galaxy-language-server.git
cd galaxy-language-server/server
python3 -m venv myenv
source ./myenv/bin/activate
python3 -m pip install -r ./requirements.txt
python3 -m galaxyls
If everything went well, you can check the log file galaxy-language-server.log
was created and the contents have something like this:
INFO:pygls.server:Starting IO server
INFO:pygls.server:Shutting down the server
INFO:pygls.server:Closing the event loop.
By default, the server uses IO pipes to communicate with the client, if you want to use TCP you can pass additional parameters as described here:
python3 -m galaxyls --tcp --host=127.0.0.1 --port=2087
Usually, the client will be in charge of running the server when it is needed like here, but in case someone wants to run it manually, I will add a section in the readme to explain this, so thank you for bringing it up :)
Oh, I was just about to write that I got it working with
python -m galaxyls <<< 'from galaxyls import server; server.LanguageServer.start_tcp("0.0.0.0","9991");'
but your way is much easier :D
Hi, thanks for this great work -- I cannot seem to get the galaxy-language-server to start
Steps
In the
galaxy-language-server/server/build
folder I see:Trying to run something
python build/lib/galaxyls/__main__.py
orpython galaxyls/server.py
Traceback (most recent call last): File "build/lib/galaxyls/main.py", line 4, in
from .server import language_server
ImportError: attempted relative import with no known parent package
Beyond this, I am not sure how to start the server