Skip to content

Editor integration

ty can be integrated with various editors to provide a seamless development experience.

Learn more about ty's editor features in the language server documentation.

VS Code

The Astral team maintains an official VS Code extension.

Install the ty extension from the VS Code Marketplace.

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,
}

Neovim

The nvim-lspconfig extension is the recommended way of using ty with Neovim (if you prefer not to install the extension, you can copy the ty configuration manually instead). After installing the nvim-lspconfig extension, you need to enable the language server (and can optionally configure additional settings). For Neovim >=0.11, you can add the following snippet to your config file:

-- Optional: Only required if you need to update the language server settings
vim.lsp.config('ty', {
  settings = {
    ty = {
      -- ty language server settings go here
    }
  }
})

-- Required: Enable the language server
vim.lsp.enable('ty')

For Neovim \<0.11, you would use the configuration below instead (note that you might need to install an older version of nvim-lspconfig):

require('lspconfig').ty.setup({
  settings = {
    ty = {
      -- ty language server settings go here
    }
  }
})

Zed

ty is included with Zed out of the box (no extension required), although the default primary LSP for Python is basedpyright.

You can enable ty and disable basedpyright by adding this to your settings.json file:

{
  "languages": {
    "Python": {
      "language_servers": [
        // Enable ty and ruff,
        // Other built-in servers (basedpyright, pyright, pylsp)
        // are disabled by being omitted from this list.
        "ty",
        "ruff"
      ]
    }
  }
}

You can override the ty executable Zed uses by setting lsp.ty.binary:

{
  "lsp": {
    "ty": {
      "binary": {
        "path": "/home/user/.local/bin/ty",
        "arguments": ["server"]
      }
    }
  }
}

More information in Zed's documentation.

PyCharm

PyCharm 2026.3

Open Settings → Python → Tools → External Tools and enable ty. For configuration options, see the PyCharm documentation.

PyCharm 2026.2

Open Settings → Python → Tools → External Tools and enable ty. Use Lookup to choose how PyCharm finds ty.

PyCharm 2025.3 through 2026.1

Open Settings → Python → Tools → ty and select Enable. See the PyCharm 2026.1 documentation for configuration options.

Emacs

ty can be utilized as a language server via the built-in Eglot client, which is part of Emacs since version 29.

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs
               '((python-base-mode :language-id "python") . ("ty" "server"))))

(add-hook 'python-base-mode-hook 'eglot-ensure)

If you prefer to view ty's diagnostics through Flycheck, the flycheck-eglot package bridges Eglot's diagnostics to Flycheck.

Other editors

ty can be used with any editor that supports the language server protocol.

To start the language server, use the server subcommand:

ty server

Refer to your editor's documentation to learn how to connect to an LSP server.

Settings

See the editor settings reference for more details on configuring the language server.