Skip to content

Commit 11540c5

Browse files
authored
Update VS Code extension docs (#2475)
## Summary Ref: astral-sh/ty-vscode#288
1 parent c7f6404 commit 11540c5

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

docs/editors.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,22 @@ The Astral team maintains an official VS Code extension.
1111

1212
Install the [ty extension](https://marketplace.visualstudio.com/items?itemName=astral-sh.ty) from the VS Code Marketplace.
1313

14-
Then disable the language server from the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) by adding the
15-
following [setting](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) to your `settings.json` to avoid running two language servers:
16-
17-
```json
14+
The extension automatically disables the language server from the [Python
15+
extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
16+
to avoid running two Python language servers. This is done by setting
17+
[`python.languageServer`](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings)
18+
to `"None"` as a default configuration.
19+
20+
If you prefer to use ty only for type checking and want to use another language
21+
server for capabilities like hover, auto-completions, etc., you can override
22+
this by explicitly setting [`python.languageServer`](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) and
23+
[`ty.disableLanguageServices`](./reference/editor-settings.md#disablelanguageservices)
24+
in your [`settings.json`](https://code.visualstudio.com/docs/configure/settings#_settings-json-file):
25+
26+
```jsonc
1827
{
19-
"python.languageServer": "None"
28+
"python.languageServer": "Pylance",
29+
"ty.disableLanguageServices": true,
2030
}
2131
```
2232

0 commit comments

Comments
 (0)