Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve cli/lsp installation instructions #628

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
- Getting Started

- [Installation](installation.md)
- [Command-line & language server](installation.md#command-line--language-server)
- [IDEs](installation.md#ides)
- [Getting Started](getting-started.md)
- [Static Typing](type-concepts.md)
- [Features](features.md)
Expand Down
38 changes: 30 additions & 8 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,60 @@

## Command-line & language server

### pipi package (recommended)

unlike pyright, the basedpyright CLI & LSP are available as a [pypi package](https://pypi.org/project/basedpyright/) instead of an npm package.

this makes it far more convenient for python developers to use, since there's no need to install any additional tools. just install it normally via your package manager of choice:

<!-- tabs:start -->

### **pdm**
### **uv**

add it to your project's dev dependencies (recommended):
```
pdm add basedpyright
uv add --dev basedpyright
```

### **rye**

or just install it:
```
rye add basedpyright
uv pip install basedpyright
```

### **uv**
### **pdm**

```
uv pip install basedpyright
pdm add --dev basedpyright
```

### **pip**

```
pip install basedpyright
```

<!-- tabs:end -->

### other installation methods

the basedpyright CLI & language server is also available outside of pypi:

<!-- tabs:start -->

### **homebrew**

```
brew install basedpyright
```

### **nixOS**

[see here](https://search.nixos.org/packages?channel=unstable&show=basedpyright)

<!-- tabs:end -->

### usage

once installed, the `basedpyright` and `basedpyright-langserver` scripts will be available in your python environment. when running basedpyright via the command line, use the `basedpyright` command:

```shell
Expand All @@ -52,7 +69,12 @@ for instructions on how to use `basedpyright-langserver`, see the [IDE-specific
most of these IDE plugins require [the pypi package to be installed](#command-line--language-server).

### VS Code
install the extension from [the vscode extension marketplace](https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright) or [the open VSX registry](https://open-vsx.org/extension/detachhead/basedpyright)

install the extension from [the vscode extension marketplace](https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright)

### VSCodium

install the extension from [the open VSX registry](https://open-vsx.org/extension/detachhead/basedpyright)

### Neovim
You need to install the LSP client addapter plugin,
Expand Down
Loading