๐Ÿ“ฆ astral-sh / ty-vscode

A Visual Studio Code extension for ty.

โ˜… 321 stars โ‘‚ 11 forks ๐Ÿ‘ 321 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/astral-sh/ty-vscode.git
HTTPS git clone https://github.com/astral-sh/ty-vscode.git
SSH git clone git@github.com:astral-sh/ty-vscode.git
CLI gh repo clone astral-sh/ty-vscode
renovate[bot] renovate[bot] Update dependency @types/node to v24.10.7 (#294) 845886e 1 days ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ assets
๐Ÿ“ build
๐Ÿ“ bundled
๐Ÿ“ scripts
๐Ÿ“ src
๐Ÿ“„ .editorconfig
๐Ÿ“„ .gitignore
๐Ÿ“„ .prettierignore
๐Ÿ“„ .vscodeignore
๐Ÿ“„ CODE_OF_CONDUCT.md
๐Ÿ“„ CONTRIBUTING.md
๐Ÿ“„ eslint.config.mjs
๐Ÿ“„ icon.png
๐Ÿ“„ justfile
๐Ÿ“„ LICENSE
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ pyproject.toml
๐Ÿ“„ README.md
๐Ÿ“„ requirements.txt
๐Ÿ“„ TROUBLESHOOTING.md
๐Ÿ“„ tsconfig.json
๐Ÿ“„ webpack.config.js
๐Ÿ“„ README.md

ty extension for Visual Studio Code

image image Actions status

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.

Installation

Install this extension from the Visual Studio Marketplace.

Features

Currently, the extension supports the following features:

Usage

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.

Untrusted Workspace

The extension supports untrusted workspace. For untrusted workspaces, the extension always uses the bundled ty executable, ignoring the following settings:

Settings

See the ty editor settings reference for an enumeration of all supported settings.

Commands

CommandDescription
ty: Restart serverRestart the ty language server
ty: Show client logsOpen the "ty" output channel
ty: Show server logsOpen the "ty Language Server" output channel
ty: Open debug informationOpens a window with debug information

Requirements

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.

Getting help

See the troubleshooting guide to get more information on how to debug issues with the extension or the language server.

Publisher

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.

License

The ty extension is licensed under the MIT license (LICENSE).