fix eglot hooks in the lamest way possible

This commit is contained in:
mehbark 2026-04-22 15:57:20 -04:00
parent f74d1ecbf1
commit c799612d64
Signed by: mbk
GPG key ID: E333EC1335FFCCDB

View file

@ -544,9 +544,17 @@ If the new path's directories does not exist, create them."
(use-package eglot
;; no :ensure t here because it's built-in
:hook
(rust-mode . eglot-ensure)
(before-save . eglot-format)
; :hook
; (((rust-mode rust-ts-mode) . eglot-ensure)
; (before-save . eglot-format)
; (eglot-managed-mode . #'(lambda () (eglot-inlay-hints-mode -1))))
:init
(add-hook 'rust-mode-hook #'eglot-ensure)
(add-hook 'rust-ts-mode-hook #'eglot-ensure)
(add-hook 'before-save-hook #'eglot-format)
(add-hook 'eglot-managed-mode-hook
(lambda () (eglot-inlay-hints-mode -1)))
:bind (("C-SPC" . complete-symbol))
@ -1004,6 +1012,7 @@ If the new path's directories does not exist, create them."
"ld" 'xref-find-definitions
"ln" 'imenu
"lE" 'eglot
"lP" 'treemacs-add-and-display-current-project-exclusively
; ripgrep
"lg" 'consult-ripgrep