diff --git a/README.md b/README.md index ccf31bf..32f1292 100644 --- a/README.md +++ b/README.md @@ -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, } ```