python-language-server icon indicating copy to clipboard operation
python-language-server copied to clipboard

Docs: how to start the server?

Open GeorgeBekh opened this issue 5 years ago • 7 comments

I'm sorry to ask such question, but i can't figure out how to start this server to use with emacs' "eglot" (in stdio mode basically)

I did pip install 'python-language-server' and pip install 'python-language-server[all]'

GeorgeBekh avatar Oct 06 '18 18:10 GeorgeBekh

UPDATE: Figured it out python -m pyls

GeorgeBekh avatar Oct 06 '18 18:10 GeorgeBekh

Solved in https://github.com/palantir/python-language-server/pull/430

GeorgeBekh avatar Oct 06 '18 18:10 GeorgeBekh

Yes! Thank you for making this an issue. This really needs to be in the docs. I'm right now creating a bash script in ~/bin that reads like this ~/bin/python-language-server: #!/bin/bash python -m pyls

Of course, I suppose that could be done in one line: #!/usr/bin/python -m pyls

But the one line version doesn't work. Fails with " /usr/bin/python: No module named pyls" but if I copy the same darn line down one, with /bin/bash above, it works. Go figure.

Anyway, I'm done here.

Do PLEASE add this to the docs somewhere!

jgilmore avatar Nov 15 '18 23:11 jgilmore

And how to config the monaco editor to use this server? Any demo about this? Thanks a lot.

wufeng87 avatar Nov 28 '18 02:11 wufeng87

@wufeng87 did you find a solution?

doczoidberg avatar Oct 23 '19 15:10 doczoidberg

There are some examples of connecting monaco to PYLS here: https://github.com/palantir/python-jsonrpc-server#examples

gatesn avatar Oct 23 '19 20:10 gatesn

The script installed by pip3 install python-language-server is broken.

$ pyls
Traceback (most recent call last):
  File "/usr/local/bin/pyls", line 5, in <module>
    from pyls.__main__ import main
ModuleNotFoundError: No module named 'pyls.__main__'

tidux avatar Nov 25 '19 22:11 tidux