feat(emacs): update sh-mode

This adds shellcheck for creating better scripts and bats mode for testing
support.

It also added .env files to the mode list so I get highlighting in .env files
This commit is contained in:
Ade Attwood 2021-11-21 16:26:25 +00:00
parent 0c92f447e8
commit ec7c111e2f

View file

@ -8,3 +8,14 @@
;; sh-mode is already installed just need to enable lsp in that mode
(add-hook 'sh-mode-hook 'lsp)
;; Add .env file to be highlighted with the sh-mode syntax
(add-to-list 'auto-mode-alist '("\\.env\\'" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.env\\.example\\'" . sh-mode))
(use-package flymake-shellcheck
:commands flymake-shellcheck-load
:init
(add-hook 'sh-mode-hook 'flymake-shellcheck-load))
(use-package bats-mode :ensure t);