-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationeditor
Description
Summary
I open this issue to draft an Emacs section in https://docs.astral.sh/ty/editors
Support
- Ty works with Emacs flymake.
- Ty now works with flycheck and eglot with flycheck support for eglot (as of 2016/02/24).
Setup
Add this snippet in init.el
;; load flycheck, eglot, and flycheck-eglot packages
;; or use Flymake package
;; see package doc
(use-package flycheck
:ensure t
:init
(global-flycheck-mode)
;; A minor mode to show Flycheck error messages in a popup.
(flycheck-pos-tip-mode)
)
;; A minor-mode for Flycheck which colors the mode line according to the Flycheck state of the current buffer.
;; https://github.com/flycheck/flycheck-color-mode-line
(use-package flycheck-color-mode-line
:after (flycheck)
:hook (flycheck-mode . flycheck-color-mode-line-mode)
)
(use-package eglot
:ensure t
:commands eglot
;; auto start eglot for those modes
:hook ((python-mode python-ts-mode) . eglot-ensure)
:custom
(eglot-autoshutdown t)
)
;; Customize eglot-server-programs to use ty as lsp
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
`((python-mode python-ts-mode) . ("ty" "server"))))
;; Flycheck support for eglot
;; https://github.com/intramurz/flycheck-eglot
(use-package flycheck-eglot
:ensure t
:after (flycheck eglot)
:config
(global-flycheck-eglot-mode 1)
)Eglot Inlay Hints
Eglot Inlay Hints mode show implicit kwargs in the buffer.
Use M-x eglot-inlay-hints-mode to toggle inlay hints mode which are quite annoying (buggy) while editing code !!!
inlay hints are displayed using the three faces eglot-type-hint-face, eglot-parameter-hint-face, and eglot-inlay-hint-face, which all inherit from eglot-inlay-hint-face.
Version
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationeditor