Skip to content
emacs lsp-mode client for Microsoft's python language server
Branch: master
Clone or download
Latest commit d3f5fd0 Jul 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Cask cask: add new project file to install dependencies Dec 20, 2018
LICENSE Create LICENSE Jan 30, 2019 Fix missing parenthesis Jul 14, 2019
lsp-python-ms.el Perfer powershell to uncompress on Windows. Jul 12, 2019

lsp-mode client leveraging microsoft’s python-language-server.


Include lsp-python-ms in the configuration file:

(require lsp-python-ms)
(add-hook 'python-mode #'lsp) ; or lsp-deferred

A minimal use-package initialization might be:

(use-package lsp-python-ms
  :ensure t
  :hook (python-mode . (lambda ()
                          (require 'lsp-python-ms)
                          (lsp))))  ; or lsp-deferred

Normally the python-language-server will be downloaded automatically if it doesn’t exist while opening the python scripts.

If you have troubles to download the package, you can also build the server yourselves.

  1. Install dotnet-sdk
  2. Clone and build python-language-server:
    git clone
    cd python-language-server/src/LanguageServer/Impl
    dotnet publish -c Release -r osx-x64   # mac

    Change the -r flag according to your architecture and operating system. See Microsoft’s Runtime ID Catalog for the right value for your system.

    Then make the binary executable.

    chmod a+x $(git rev-parse --show-toplevel)/output/bin/Release/osx-x64/publish/Microsoft.Python.LanguageServer

    NOTE: on some systems (for example, Fedora), the executable comes out as Microsoft.Python.LanguageServer.LanguageServer.

  3. Set executable to lsp-python-ms-executable.
    ;; for executable of language server, if it's not symlinked on your PATH
    (setq lsp-python-ms-executable

For development, you might find it useful to run cask install.


All credit to cpbotha on vxlabs! This just tidies and packages his work there

You can’t perform that action at this time.