Skip to content

Commit

Permalink
move some stuff in the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Apr 3, 2024
1 parent de4e1c6 commit 20edc83
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,32 @@ install the extension from [the vscode extension marketplace](https://marketplac
## usage
the basedpyright vscode extension will automatically look for the pypi package in your python environment. see the recommended setup section below for more information
the basedpyright vscode extension will automatically look for the pypi package in your python environment.
you should change the following config files to prevent pylance from conflicting with basedpyright:
```jsonc
// .vscode/extensions.json

{
"recommendations": [
"detachhead.basedpyright" // this will prompt developers working on your project to install the extension
],
"unwantedRecommendations": [
"ms-python.vscode-pylance"
]
}
```

in `.vscode/settings.json`, remove any settings starting with `python.analysis`, as they are not used by basedpyright. you should instead set these settings using the `tool.basedpyright` (or `tool.pyright`) section in `pyroject.toml` ([see below](#pyprojecttoml))

you should also disable the built in language server support from the python extension, as it conflicts with basedpyright's language server:
```json
// .vscode/settings.json
{
"python.languageServer": "None"
}
```

## using basedpyright with pylance (not recommended)

Expand Down Expand Up @@ -268,29 +293,6 @@ it's recommended to use both the basedpyright cli and vscode extension in your p

below are the changes i recommend making to your project when adopting basedpyright

## `.vscode/extensions.json`

```jsonc
{
"recommendations": [
"detachhead.basedpyright" // this will prompt developers working on your project to install the extension
],
"unwantedRecommendations": [
"ms-python.vscode-pylance"
]
}
```

## `.vscode/settings.json`

- remove any settings starting with `python.analysis`, as they are not used by basedpyright. you should instead set these settings using the `tool.basedpyright` (or `tool.pyright`) section in `pyroject.toml` ([see below](#pyprojecttoml))
- disable the built in language server support from the python extension, as it seems to conflict with basedpyright's language server:
```json
{
"python.languageServer": "None"
}
```

## `pyproject.toml`

we recommend using [pdm with pyprojectx](https://pdm-project.org/latest/#other-installation-methods) (click the "inside project" tab) to manage your dependencies.
Expand Down

0 comments on commit 20edc83

Please sign in to comment.