Skip to content

Commit

Permalink
improve installation instructions and some otehr wording fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Mar 18, 2024
1 parent 05a86e6 commit 9e0a293
Showing 2 changed files with 14 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<h1><img src="https://github.com/DetachHead/basedpyright/assets/57028336/c7342c31-bf23-413c-af6d-bc430898b3dd"> basedpyright</h1>

Basedpyright is a static type checker for Python that is built on top of the work done by the [pyright project](https://github.com/Microsoft/pyright).
Basedpyright is a fork of [pyright](https://github.com/microsoft/pyright) with various type checking improvements, improved vscode support and pylance features built into the language server.

## why?

the main motivation behind this fork was the fact that pyright has several serious issues that the maintainers didn't want to address, and many bugs that they consider to be intentional behavior. here is a list of some of its major problems that we've resolved in basedpyright:
the main motivation behind this fork was the fact that pyright has several serious issues that the maintainers didn't want to address, and many bugs that they consider to be intentional behavior. here is a list of some of its major problems that basedpyright resolves:

### ability to pin the version used by vscode

@@ -60,7 +60,9 @@ basedpyright introduces the `reportAny` option, which will report an error on us

### re-implementing pylance-exclusive features

basedpyright re-implements some of the features that microsoft made exclusive to their closed-source pylance extension. for more information about the differences between pyright and pylance, see [here](#pylance-vs-basedpyright)
basedpyright re-implements some of the features that microsoft made exclusive to their closed-source pylance extension. for more information about the differences between pyright and pylance, see [here](#pylance-vs-basedpyright).

these features are implemented in the language server, meaning they are no longer exclusive to vscode. you can use any editor that supports the [language server protocol](https://microsoft.github.io/language-server-protocol/). for more information on installing pyright in your editor of choice, see [the installation instructions](https://detachhead.github.io/basedpyright/#/installation)

#### import suggestion code actions
pyright only supports import suggestions as autocomplete suggestions, but not as quick fixes (see [this issue](https://github.com/microsoft/pyright/issues/4263#issuecomment-1333987645)).
13 changes: 9 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
## Installation

⚠ basedpyright has only been tested on vscode. i don't use any other editor, so if you have issues with any of these other plugins feel free to raise an issue

### Language Server

#### VS Code
see https://github.com/DetachHead/basedpyright#vscode-extension
install the extension from [the vscode extension marketplace](https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright).

#### Neovim
BasedPyright is available through the [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#basedpyright) adapter for native Neovim's LSP support. TL;DR simply add this to your Neovim's settings:
@@ -16,15 +14,22 @@ lspconfig.basedpyright.setup{}
Further info for this LSP server options for `nvim-lspconfig` are available on their docs, linked above.

#### Vim
*⚠ basedpyright has not been tested on this editor. if you run into issues with these instructions, please raise an issue.*

Vim/Neovim users can install [coc-pyright](https://github.com/fannheyward/coc-pyright), the Pyright extension for coc.nvim.

Alternatively, [ALE](https://github.com/dense-analysis/ale) will automatically check your code with Pyright if added to the linters list.

#### Sublime Text
*⚠ basedpyright has not been tested on this editor. if you run into issues with these instructions, please raise an issue.*

Sublime text users can install the [LSP-pyright](https://github.com/sublimelsp/LSP-pyright) plugin from [package control](https://packagecontrol.io/packages/LSP-pyright).

#### Emacs
*⚠ basedpyright has not been tested on this editor. if you run into issues with these instructions, please raise an issue.*

Emacs users can install [eglot](https://github.com/joaotavora/eglot) or [lsp-mode](https://github.com/emacs-lsp/lsp-mode) with [lsp-pyright](https://github.com/emacs-lsp/lsp-pyright).

### Command-line
see https://github.com/DetachHead/basedpyright#pypi-package

unlike pyright, basedpyright is available as a [pypi package](https://pypi.org/project/basedpyright/) instead of an npm package. for more information, [see here](https://detachhead.github.io/basedpyright/#/?id=published-as-a-pypi-package-no-nodejs-required)

0 comments on commit 9e0a293

Please sign in to comment.