Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

lithammer/nvim-pylance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nvim-pylance

Adds support for Pylance to nvim-lspconfig.

Important note!

As of the 2020.10.3 release of Pylance it's no longer possible to run it in a stand-alone fashion as you will only get prompted with this license notice below. Because of this, I've decided to archive this repo indefinitely.

You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. You may not: work around any technical limitations in the software that only allow you to use it in certain ways; reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software; remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software; use the software in any way that is against the law or to create or propagate malware; or share, publish, distribute, or lease the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.

Meanwhile you can use the open-source language server Pyright instead, which Pylance is built on:

$ npm install -g pyright
nvim_lsp.pylance.setup({
  cmd = {'pyright-langserver', '--stdio'}
})

Installation

First install the Pylance extension from the VS Code marketplace.

" Using vim-plug
Plug 'lithammer/nvim-pylance'

" Using vim-packager
call packager#add('lithammer/nvim-pylance')
local lspconfig = require('lspconfig')
local pylance = require('pylance')

pylance.setup()
lspconfig.pylance.setup({
  -- https://github.com/microsoft/pylance-release#settings-and-customization
  settings = {
    python = {
      analysis = {
        indexing = true,
        typeCheckingMode = 'basic',
      }
    }
  }
})

Upgrade

Upgrade Pylance via VS Code.

About

Add Pylance support to nvim-lspconfig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages