Lsp: Is there a way I can use Microsoft's python-language-server for my Python code ?

Created on 20 Sep 2019  Â·  8Comments  Â·  Source: sublimelsp/LSP

This is not a bug, but rather a request please .
Can you please let me know how can I setup https://github.com/Microsoft/python-language-server for my Python code please ?

They have already created a MD file which basically gives the hint on how you can use it , but it uses a ".dll" and I am on a mac, so I am pretty sure that it is not going to work.

Thanks
Gagan

questioheldebug

All 8 comments

That language server is written in C#, so you'll have to build it using tooling around C#.

I assume you tried downloading a version of the server as described in this issue? https://github.com/microsoft/python-language-server/issues/770

Might be counter-intuitive but I believe the dotnet DLLs _do_ work on any platform. So `["dotnet", "exec", "/Users/gj1118/python-language-server/Microsoft.Python.LanguageServer.dll"] should work, I think?

I did see that but when I click on that link for Mac, I get the following error

image

I have checked out the sources, nevertheless, but I am not sure about the dll.

Yes, the issue points to a version that no longer exists, can you change
the URL to get a newly released version?

On Fri, Sep 20, 2019 at 12:59 PM Gagan Janjua notifications@github.com
wrote:

I did see that but when I click on that link for Mac, I get the following
error

[image: image]
https://user-images.githubusercontent.com/473101/65322163-0b131500-db74-11e9-88a8-95785b945f41.png

I have checked out the sources, nevertheless, but I am not sure about the
dll.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tomv564/LSP/issues/726?email_source=notifications&email_token=ABBRGODZUI6RULV3FBYDBTDQKSUKFA5CNFSM4IYTFGQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GK76I#issuecomment-533508089,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABBRGOFCYJ7BV6ZE6NPQFO3QKSUKFANCNFSM4IYTFGQA
.

I set it up for python33 to test it for ST package development. My configuration was

        "mspyls":
        {
            "command":
            [
                "dotnet.exe",
                "exec",
                "C:\\Apps\\Sublime Text 3\\mspyls\\Microsoft.Python.LanguageServer.dll"
            ],
            "enabled": true,
            "env":
            {
                "PYTHONPATH": "C:\\Apps\\Sublime Text 3;C:\\Apps\\Sublime Text 3\\Data\\lib\\python3.3;C:\\Apps\\Sublime Text 3\\Data\\Packages"
            },
            "initializationOptions":
            {
                "interpreter":
                {
                    "properties":
                    {
                        "InterpreterPath": "C:\\Apps\\python33\\python.exe",
                        "UseDefaultDatabase": true,
                        "Version": "3.3"
                    }
                }
            },
            "languageId": "python",
            "scopes":
            [
                "source.python"
            ],
            "syntaxes":
            [
                "Packages/Python/Python.sublime-syntax"
            ]
        },

But I find python-language-server to produce better experience.

@deathaxe, which python language server you are referring to be better:

  1. https://github.com/palantir/python-language-server
  2. https://github.com/Microsoft/python-language-server

The orignal one of course. (1.)

Closing this, hoping @gj1118 has gotten a python-language-server working :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

devnix picture devnix  Â·  3Comments

ryanpcmcquen picture ryanpcmcquen  Â·  4Comments

lsmenicucci picture lsmenicucci  Â·  3Comments

JonasPf picture JonasPf  Â·  6Comments

tomv564 picture tomv564  Â·  4Comments