eglot load markdown for document

This commit is contained in:
zedhugh committed 2023-06-10 06:41:54 +08:00
1 parent d6facf0122
commit 8776ef1764
1 file changed
+9
+9
View File
@@ -2,12 +2,21 @@
(require 'lazy-load)
(defun creature/eglot-load-markdown-for-doc ()
(when (and (fboundp 'eglot-managed-p)
(eglot-managed-p)
(not (featurep 'markdown-mode))
(locate-library "markdown-mode"))
(require 'markdown-mode)))
(with-eval-after-load 'eglot
(setq eglot-events-buffer-size 0)
(setq eglot-confirm-server-initiated-edits nil)
(setq eglot-autoshutdown t)
(add-to-list 'eglot-ignored-server-capabilities :inlayHintProvider)
(add-hook 'eglot-managed-mode-hook #'creature/eglot-load-markdown-for-doc)
(lazy-load-set-keys
'(("M-." . xref-find-definitions)
("M-?" . xref-find-references)