Disable logging of LSP traffic.

This commit is contained in:
Tom Alexander
2023-09-08 11:55:56 -04:00
parent ed25cd6d31
commit 993e773414
3 changed files with 34 additions and 24 deletions

View File

@@ -7,6 +7,8 @@
;; M-?
;; ([remap xref-find-references] . lsp-ui-peek-find-references)
("C-c C-a" . eglot-code-actions)
;; C-M-.
([remap xref-find-apropos] . #'consult-eglot-symbols)
)
:hook (
(eglot-managed-mode . (lambda ()
@@ -16,27 +18,19 @@
))
)
:config
;; Increase garbage collection threshold for performance (default 800000)
(setq gc-cons-threshold 100000000)
;; Increase amount of data read from processes, default 4k
(when (>= emacs-major-version 27)
(setq read-process-output-max (* 1024 1024)) ;; 1mb
)
(fset #'jsonrpc--log-event #'ignore) ;; Disable logging LSP traffic for performance boost
(set-face-attribute 'eglot-highlight-symbol-face nil :background "#0291a1" :foreground "black")
(set-face-attribute 'eglot-mode-line nil :inherit 'mode-line :bold nil)
(use-package consult-eglot
:bind (
:map eglot-mode-map
;; C-M-.
([remap xref-find-apropos] . #'consult-eglot-symbols)
)
)
:custom
(eglot-autoshutdown t "Shut down server when last buffer is killed.")
(eglot-sync-connect 0 "Don't block on language server starting.")
(eglot-send-changes-idle-time 0.1)
)
(use-package consult-eglot
:commands (consult-eglot-symbols)
)
(provide 'common-lsp)