eglot mode hooks
This commit is contained in:
parent
7fa31f7ce2
commit
a96fed6261
1 changed files with 10 additions and 2 deletions
|
@ -4,11 +4,10 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(require 'lsp-mode)
|
(require 'lsp-mode)
|
||||||
;; Language modes + configurations
|
;; Language modes + configurations
|
||||||
|
(require 'eglot)
|
||||||
(use-package typescript-mode
|
(use-package typescript-mode
|
||||||
:mode
|
:mode
|
||||||
("\\.tsx?\\'" . typescript-mode)
|
("\\.tsx?\\'" . typescript-mode)
|
||||||
:hook
|
|
||||||
(typescript-mode . lsp-deferred)
|
|
||||||
:config
|
:config
|
||||||
(setq typescript-indent-level 2))
|
(setq typescript-indent-level 2))
|
||||||
|
|
||||||
|
@ -44,6 +43,15 @@
|
||||||
(use-package json-mode)
|
(use-package json-mode)
|
||||||
(use-package yaml-mode)
|
(use-package yaml-mode)
|
||||||
|
|
||||||
|
;; eglot mode hooks
|
||||||
|
(add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd"))
|
||||||
|
(add-hook 'c-mode-hook 'eglot-ensure)
|
||||||
|
(add-hook 'c++-mode-hook 'eglot-ensure)
|
||||||
|
(add-hook 'typescript-mode 'eglot-ensure)
|
||||||
|
(add-hook 'go-mode 'eglot-ensure)
|
||||||
|
(add-hook 'clojure-mode 'eglot-ensure)
|
||||||
|
|
||||||
|
|
||||||
;; Built-in mode configs
|
;; Built-in mode configs
|
||||||
; Ruby
|
; Ruby
|
||||||
(add-to-list 'auto-mode-alist
|
(add-to-list 'auto-mode-alist
|
||||||
|
|
Loading…
Reference in a new issue