Add hook to enable eglot in prog-mode

This commit is contained in:
Evie Litherland-Smith 2023-11-09 11:41:56 +00:00
parent d9802d98ae
commit 454d446077
2 changed files with 10 additions and 0 deletions

View file

@ -384,6 +384,11 @@
(use-package direnv
:config (direnv-mode +1))
(when (require 'eglot nil :noerror)
;; Currently just using prog-mode
;; Should probably use individual language modes
;; One day...
(add-hook 'prog-mode-hook #'eglot-ensure))
;;; Eglot
(defun crafted-ide--add-eglot-hooks (mode-list)
"Add `eglot-ensure' to modes in MODE-LIST.

View file

@ -448,6 +448,11 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
** Eglot LSP
#+BEGIN_SRC emacs-lisp
(when (require 'eglot nil :noerror)
;; Currently just using prog-mode
;; Should probably use individual language modes
;; One day...
(add-hook 'prog-mode-hook #'eglot-ensure))
;;; Eglot
(defun crafted-ide--add-eglot-hooks (mode-list)
"Add `eglot-ensure' to modes in MODE-LIST.