Skip to content

Commit 1b2fb6a

Browse files
authored
Update README for the python.languageServer configuration default (#288)
## Summary Follow-up to #283 [Rendered](https://github.com/astral-sh/ty-vscode/blob/99c5090fc98c03da5cc5df6ea5fccd0cf34134ee/README.md#usage)
1 parent 75c820d commit 1b2fb6a

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,21 @@ Currently, the extension supports the following features:
3737
Once installed in Visual Studio Code, ty will automatically execute when you open or edit a
3838
Python or Jupyter Notebook file.
3939

40-
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
41-
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):
42-
43-
```json
40+
The extension automatically disables the language server from the [Python
41+
extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
42+
to avoid running two Python language servers. This is done by setting
43+
[`python.languageServer`](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) to `"None"` as a default configuration.
44+
45+
If you prefer to use ty only for type checking and want to use another language
46+
server for capabilities like hover, auto-completions, etc., you can override
47+
this by explicitly setting [`python.languageServer`](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) and
48+
[`ty.disableLanguageServices`](https://docs.astral.sh/ty/reference/editor-settings/#disablelanguageservices)
49+
in your [`settings.json`](https://code.visualstudio.com/docs/configure/settings#_settings-json-file):
50+
51+
```jsonc
4452
{
45-
"python.languageServer": "None"
53+
"python.languageServer": "Pylance",
54+
"ty.disableLanguageServices": true,
4655
}
4756
```
4857

0 commit comments

Comments
 (0)