emacs: only call eglot-ensure in specific modes
This commit is contained in:
parent
97cc933719
commit
d9e3c75ed9
1 changed files with 9 additions and 6 deletions
|
@ -138,22 +138,25 @@ One will be created if none exist."
|
||||||
(marginalia-mode)
|
(marginalia-mode)
|
||||||
(vertico-mode)
|
(vertico-mode)
|
||||||
|
|
||||||
;; company completion + eglot
|
;; company completion
|
||||||
(package-install 'company)
|
(package-install 'company)
|
||||||
(require 'company)
|
(require 'company)
|
||||||
(require 'eglot)
|
|
||||||
(add-hook 'after-init-hook 'global-company-mode)
|
(add-hook 'after-init-hook 'global-company-mode)
|
||||||
(add-hook 'prog-mode-hook 'eglot-ensure)
|
|
||||||
(add-to-list 'eglot-server-programs `(d-ts-mode . ("serve-d")))
|
|
||||||
(setq company-begin-commands '(self-insert-command)
|
(setq company-begin-commands '(self-insert-command)
|
||||||
company-idle-delay .1
|
company-idle-delay .1
|
||||||
company-minimum-prefix-length 2
|
company-minimum-prefix-length 2
|
||||||
company-show-numbers t
|
company-show-numbers t
|
||||||
company-tooltip-align-annotations 't)
|
company-tooltip-align-annotations 't
|
||||||
(setq read-buffer-completion-ignore-case t
|
read-buffer-completion-ignore-case t
|
||||||
read-file-name-completion-ignore-case t
|
read-file-name-completion-ignore-case t
|
||||||
completion-ignore-case t)
|
completion-ignore-case t)
|
||||||
|
|
||||||
|
;; eglot
|
||||||
|
(require 'eglot)
|
||||||
|
(add-hook 'c-ts-mode-hook 'eglot-ensure)
|
||||||
|
(add-hook 'c++-ts-mode-hook 'eglot-ensure)
|
||||||
|
(add-to-list 'eglot-server-programs `(d-ts-mode . ("serve-d")))
|
||||||
|
|
||||||
;; diff information in the gutter
|
;; diff information in the gutter
|
||||||
(package-install 'diff-hl)
|
(package-install 'diff-hl)
|
||||||
(global-diff-hl-mode)
|
(global-diff-hl-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue