configs/emacs: add typescript to eglot's startup stuff, C-c f to fmt

This commit is contained in:
Aaron Bieber 2024-05-26 07:29:04 -06:00
parent 1cef126bcf
commit 2eccbf67af
No known key found for this signature in database

View File

@ -187,7 +187,9 @@ auto-completion stuff.
(add-hook 'go-mode-hook 'eglot-ensure)
(add-hook 'elm-mode-hook 'eglot-ensure)
(add-hook 'nix-mode-hook 'eglot-ensure)
(add-hook 'typescript-mode-hook 'eglot-ensure)
(define-key eglot-mode-map (kbd "C-c r") 'eglot-rename)
(define-key eglot-mode-map (kbd "C-c f") 'eglot-format)
(add-hook 'before-save-hook 'my-eglot-organize-imports nil t)
(add-hook 'before-save-hook 'eglot-format-buffer))