-
Notifications
You must be signed in to change notification settings - Fork 102
Update basedpyright's docs for PyCharm #1643
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
Open
charliecloudberry
wants to merge
6
commits into
DetachHead:main
Choose a base branch
from
charliecloudberry:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+12
−22
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5c26e41
Update ides.md
charliecloudberry d014912
Remove PyCharm-related images
charliecloudberry 18b77ec
Update formatting
charliecloudberry 1eb4059
Updates after review
charliecloudberry 8a4a968
Merge branch 'DetachHead:main' into main
charliecloudberry ffda151
Update PyCharm documentation link in IDE installation guide
charliecloudberry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,37 +146,27 @@ Emacs users have 3 options: | |
|
|
||
| ## PyCharm | ||
|
|
||
| === "PyCharm Community" | ||
| PyCharm users can enable native basedpyright support in the settings: | ||
|
|
||
| 1. install the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin | ||
| 2. install the [Pyright](https://plugins.jetbrains.com/plugin/24145) plugin | ||
| 3. configure it to use basedpyright by specifying `basedpyright-langserver` as the executable and check the "Resolve against interpreter directory, ignoring extension" checkbox:\ | ||
|  | ||
| 4. set "Running mode" to "LSP4IJ":\ | ||
|  | ||
| 1. Go to **Python > Tools > Pyright** in the Settings dialog. | ||
| 2. Select the **Enable** checkbox. | ||
| 3. In the Execution mode setting, select how PyCharm should search for the executable: | ||
|
|
||
| === "PyCharm Professional / IntelliJ IDEA Ultimate" | ||
| **Interpreter** mode (recommended): PyCharm searches for an executable installed in your interpreter. To install the basedpyright package for the selected interpreter, click _Install basedpyright_. | ||
|
|
||
| 1. install the [Pyright](https://plugins.jetbrains.com/plugin/24145) plugin | ||
| 3. configure it to use basedpyright by specifying `basedpyright-langserver` as the executable and check the "Resolve against interpreter directory, ignoring extension" checkbox:\ | ||
|  | ||
| 3. set "Running mode" to "Native LSP client":\ | ||
|  | ||
| **Path** mode: PyCharm searches for an executable in `$PATH`. If the executable is not found, you can specify the path by clicking the Browse... icon. | ||
|
|
||
| !!! tip "pinning basedpyright as a development dependency to your project (recommended)" | ||
|
|
||
| we recommend configuring these settings as overrides in the "Appearance & Behavior > Required Plugins" menu, and configuring the pyright plugin (and LSP4IJ if using pycharm community) as a recommended dependency: | ||
| 4. Select which options should be enabled. | ||
|
|
||
|  | ||
| For more information, refer to [PyCharm documentation](https://www.jetbrains.com/help/pycharm/2025.3/lsp-tools.html#pyright). | ||
|
|
||
| !!! tip "pinning basedpyright as a development dependency to your project (recommended)" | ||
|
|
||
| you should then commit the following generated config files, so that others working on your repo are prompted to install the plugin and don't have to manually configure it themselves: | ||
| you should commit the following generated config file, so that others working on your repo don't have to manually configure it themselves: | ||
|
|
||
| - `.idea/pyright-overrides.xml` | ||
| - `.idea/pyright.xml` | ||
| - `.idea/externalDependencies.xml` | ||
| - `.idea/misc.xml` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. turns out committing this file isn't a good idea https://youtrack.jetbrains.com/issue/PY-86020/lsp-settings-are-saved-to-a-file-that-shouldnt-be-commited |
||
|
|
||
| (note that pycharm hides the `.idea` directory by default, so you will need to `git add` the files via the CLI instead.) | ||
| (note that pycharm hides the `.idea` directory by default, so you will need to `git add` the file via the CLI instead.) | ||
|
|
||
| ## Helix | ||
|
|
||
|
|
||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.