Files
.emacs.d/modules/lsp/siren-lsp.el
Jim Myhrberg efd0b421e3 feat(lsp): Improve lsp-mode performance, support latest 7.x version
company-lsp is no longer supported by lsp-mode for providing completions
to company, instead company-capf should be used which it built-in to
company itself.
2020-07-04 18:52:33 +01:00

39 lines
967 B
EmacsLisp

;;; siren-lsp.el --- jimeh's Emacs Siren: lsp-mode configuration.
;;; Commentary:
;; Basic configuration for lsp-mode.
;;; Code:
(use-package lsp-mode
:defer t
:bind (:map lsp-mode-map
("C-c C-." . lsp-rename)
("C-c C-f" . lsp-format-buffer))
:hook
(lsp-mode . siren-lsp-mode-setup)
:custom
(lsp-eldoc-render-all nil)
(lsp-enable-xref t)
(lsp-enable-file-watchers t)
(lsp-enable-imenu t)
(lsp-keymap-prefix "M-;")
(lsp-prefer-capf t)
;; Set read process output to 1MB, instead of default 4KB. As many language
;; servers produce output ranging from 800KB to 3MB, leaving it at 4KB affects
;; performance. More info here:
;; https://emacs-lsp.github.io/lsp-mode/page/performance/
(read-process-output-max (* 1024 1024))
:init
(defun siren-lsp-mode-setup ()
(setq-local company-idle-delay 0.0
company-minimum-prefix-length 1)))
(provide 'siren-lsp)
;;; siren-lsp.el ends here