From b934118001ee9e9745d18f79fa571f32f26789dc Mon Sep 17 00:00:00 2001 From: detachhead Date: Thu, 29 Aug 2024 19:23:43 +1000 Subject: [PATCH] improve cli/lsp installation instructions --- docs/_sidebar.md | 2 ++ docs/installation.md | 38 ++++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9933f9316..7df2ed63d 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -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) diff --git a/docs/installation.md b/docs/installation.md index 18dc56062..fd93ea0b7 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,28 +2,30 @@ ## 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: -### **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** @@ -31,14 +33,29 @@ uv pip install basedpyright ``` pip install basedpyright ``` + + + +### other installation methods + +the basedpyright CLI & language server is also available outside of pypi: + + + ### **homebrew** ``` brew install basedpyright ``` +### **nixOS** + +[see here](https://search.nixos.org/packages?channel=unstable&show=basedpyright) + +### 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 @@ -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,