add eglot

This commit is contained in:
zedhugh committed 2022-10-28 00:19:25 +08:00
1 parent a35c6e0173
commit 4b135bda3e
2 files changed
+22

No files matched your search

+1
View File
@@ -118,6 +118,7 @@ If freezing sometimes, decrease it. If stuttering, increase it.")
(require 'init-which-key)
(require 'init-editorconfig)
(require 'init-typescript)
(require 'init-eglot)
(setq custom-file (expand-file-name "custom.el" creature/cache-dir))
+21
View File
@@ -0,0 +1,21 @@
;; -*- coding: utf-8; lexical-binding: t; -*-
(require 'lazy-load)
(with-eval-after-load 'eglot
(setq eglot-events-buffer-size 0)
(setq eglot-confirm-server-initiated-edits nil)
(setq eglot-autoshutdown t)
(lazy-load-set-keys
'(("M-." . xref-find-definitions)
("M-?" . xref-find-references)
("C-c r" . eglot-rename)
("C-c o" . eglot-code-actions))
eglot-mode-map))
(dolist (hook '(css-mode-hook js-mode-hook typescript-mode-hook))
(add-hook hook #'eglot-ensure))
(provide 'init-eglot)