eglot mode hooks

This commit is contained in:
Rawley Fowler 2022-06-08 08:11:39 -06:00 committed by GitHub
parent 7fa31f7ce2
commit a96fed6261
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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