Skip to content
Merged
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
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,21 @@ Currently, the extension supports the following features:
Once installed in Visual Studio Code, ty will automatically execute when you open or edit a
Python or Jupyter Notebook file.

It's recommended to disable the language server from the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) to avoid running two Python language servers
by adding the following [setting](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) to your [`settings.json`](https://code.visualstudio.com/docs/configure/settings#_settings-json-file):

```json
The extension automatically disables the language server from the [Python
extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
to avoid running two Python language servers. This is done by setting
[`python.languageServer`](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) to `"None"` as a default configuration.

If you prefer to use ty only for type checking and want to use another language
server for capabilities like hover, auto-completions, etc., you can override
this by explicitly setting [`python.languageServer`](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) and
[`ty.disableLanguageServices`](https://docs.astral.sh/ty/reference/editor-settings/#disablelanguageservices)
in your [`settings.json`](https://code.visualstudio.com/docs/configure/settings#_settings-json-file):

```jsonc
{
"python.languageServer": "None"
"python.languageServer": "Pylance",
"ty.disableLanguageServices": true,
}
```

Expand Down