summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/general.el7
-rw-r--r--lisp/web.el17
2 files changed, 12 insertions, 12 deletions
diff --git a/lisp/general.el b/lisp/general.el
index 7dd50f8..31e9019 100644
--- a/lisp/general.el
+++ b/lisp/general.el
@@ -224,6 +224,13 @@
)
)
+;; Eglot
+(use-package eglot
+ :custom
+ (eglot-autoshutdown t)
+ :ensure t
+ :defer 3)
+(set-face-background 'eglot-highlight-symbol-face "lemon chiffon")
;; Vterm
(require 'vterm)
diff --git a/lisp/web.el b/lisp/web.el
index b076147..e71673d 100644
--- a/lisp/web.el
+++ b/lisp/web.el
@@ -81,18 +81,11 @@
(add-hook 'flycheck-mode-hook #'my-use-eslint-from-node-modules)
;; Package management
-(use-package eglot
- :custom
- (eglot-autoshutdown t)
- :ensure t
- :defer 3
- :hook
- ((js-mode typescript-mode) . eglot-ensure))
- :config
- (cl-pushnew '((js-mode typescript-mode) . ("typescript-language-server" "--stdio"))
- eglot-server-programs
- :test #'equal)
-(set-face-background 'eglot-highlight-symbol-face "lemon chiffon")
+(require 'eglot)
+(add-hook 'js-mode-hook 'eglot-ensure)
+(add-hook 'typescript-mode-hook 'eglot-ensure)
+(add-to-list 'eglot-server-programs '(js-mode . ("typescript-language-server" "--stdio")))
+(add-to-list 'eglot-server-programs '(typescript-mode . ("typescript-language-server" "--stdio")))
;; Ignore certain directories in projectile
(require 'projectile)