Skip to content
mukund edited this page Oct 23, 2020 · 5 revisions

There are two options for setting up a language server with Python:

MPLS

Installation

Install MPLS from the repo: https://github.com/Microsoft/python-language-server

If you are using Arch, there are two AUR packages that can be found here:

Configuration

Add the following line to your .vimrc:

let g:LanguageClient_serverCommands = {
    'python' : ['dotnet', 'exec', '<path-to-mpls-installation>/Microsoft.Python.LanguageServer.dll'],
}

Next add the following to .vim/settings.json:

{
  "enabled": true,
  "initializationOptions": {
    "displayOptions": {
      "preferredFormat": "plaintext",
      "trimDocumentationLines": true,
      "maxDocumentationLineLength": 0,
      "trimDocumentationText": true,
      "maxDocumentationTextLength": 0
    },
    "interpreter": {
      "properties": {
        "InterpreterPath": "<path-to-python-executable>",
        "UseDefaultDatabase": true,
        "Version": "<python-version>"
      }
    }
  }
}

The entirety of the instructions here are obtained from this issue: https://github.com/autozimu/LanguageClient-neovim/issues/633

pyls

This section intentionally left blank as the author has no experience setting this up. If someone who has used pyls with this plugin can add the configuration here, that would be appreciated.

Clone this wiki locally