fix eglot hooks in the lamest way possible
This commit is contained in:
parent
f74d1ecbf1
commit
c799612d64
1 changed files with 12 additions and 3 deletions
15
init.el.nix
15
init.el.nix
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue