emacs.d/modules/jenga-elm.el

27 lines
740 B
EmacsLisp
Raw Normal View History

2019-12-07 23:09:25 +01:00
;;;; Elm mode configuration.
(require 'jenga-functions)
(instl 'elm-mode)
2019-12-08 15:17:31 +01:00
(instl 'lsp-mode)
(instl 'lsp-ui)
(instl 'yasnippet)
2019-12-07 23:09:25 +01:00
(add-hook 'elm-mode-hook #'company-mode)
2019-12-08 15:17:31 +01:00
(add-hook 'elm-mode-hook #'lsp)
2019-12-07 23:09:25 +01:00
(add-hook 'elm-mode-hook (lambda () (setq evil-auto-indent nil)))
2019-12-08 15:17:31 +01:00
(add-hook 'after-init-hook #'global-flycheck-mode)
(with-eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-elm-setup))
(add-to-list 'company-backends 'company-elm)
(define-key elm-mode-map (kbd "TAB") #'company-indent-or-complete-common)
2019-12-07 23:09:25 +01:00
;; Turn on Elm mode with *.elm files.
(add-to-list 'auto-mode-alist '("\\.elm\\'" . elm-mode))
(setq elm-format-on-save t
elm-tags-on-save t
elm-tags-exclude-elm-stuff nil)
(provide 'jenga-elm)