A Visual Studio Code extension for ty.
https://github.com/astral-sh/ty-vscode.git
A Visual Studio Code extension for ty, an extremely fast Python type checker and language server, written in Rust.
The extension ships with ty==0.0.12.
Install this extension from the Visual Studio Marketplace.
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.
The extension automatically disables the language server from the Python
extension
to avoid running two Python language servers. This is done by setting
python.languageServer 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 and
ty.disableLanguageServices
in your settings.json:
{
"python.languageServer": "Pylance",
"ty.disableLanguageServices": true,
}
If you don't want to use ty for a specific workspace, disable this extension in VS code.
The extension supports untrusted workspace. For untrusted workspaces, the extension always uses the bundled ty executable, ignoring the following settings:
See the ty editor settings reference for an enumeration of all supported settings.
| Command | Description |
|---|---|
| ty: Restart server | Restart the ty language server |
| ty: Show client logs | Open the "ty" output channel |
| ty: Show server logs | Open the "ty Language Server" output channel |
| ty: Open debug information | Opens a window with debug information |
This extension requires a version of the VSCode Python extension that supports Python 3.8+. ty itself is compatible with Python 3.8 to 3.14.
See the troubleshooting guide to get more information on how to debug issues with the extension or the language server.
This extension is published under the astral-sh account, which differs from
our Ruff extension that uses
the "charliermarsh" publisher. Both extensions are official products from Astral.
The ty extension is licensed under the MIT license (LICENSE).