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:
|
||||
(require 'lsp-mode)
|
||||
;; Language modes + configurations
|
||||
(require 'eglot)
|
||||
(use-package typescript-mode
|
||||
:mode
|
||||
("\\.tsx?\\'" . typescript-mode)
|
||||
:hook
|
||||
(typescript-mode . lsp-deferred)
|
||||
:config
|
||||
(setq typescript-indent-level 2))
|
||||
|
||||
|
@ -44,6 +43,15 @@
|
|||
(use-package json-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
|
||||
; Ruby
|
||||
(add-to-list 'auto-mode-alist
|
||||
|
|
Loading…
Reference in a new issue