Skip to content

Commit 9e46432

Browse files
authored
Use ty in Emacs with Eglot (#3107)
## Summary Add instructions on how to use ty with Emacs to the editors documentation page. ## Test Plan N/A
1 parent 1f30d7c commit 9e46432

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/editors.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ Starting with version 2025.3, PyCharm users can enable native ty support in the
123123

124124
For more information, refer to [PyCharm documentation](https://www.jetbrains.com/help/pycharm/lsp-tools.html#ty).
125125

126+
## Emacs
127+
128+
ty can be utilized as a language server via the built-in [Eglot](https://www.gnu.org/software/emacs/manual/html_node/eglot/index.html) client, which is part of Emacs since version 29.
129+
130+
```elisp
131+
(with-eval-after-load 'eglot
132+
(add-to-list 'eglot-server-programs
133+
'(python-base-mode . ("ty" "server"))))
134+
135+
(add-hook 'python-base-mode-hook 'eglot-ensure)
136+
```
137+
126138
## Other editors
127139

128140
ty can be used with any editor that supports the [language server

0 commit comments

Comments
 (0)