doomemacs/modules/lang/elm/config.el
Jeetaditya Chatterjee 7f814e5d99
refactor(:lang): redo tree-sitter hooks
- bind to major-mode-local-vars-hook instead of major mode hook
- bind the autodef tree-sitter! instead of the functions.
2022-05-22 21:26:08 +01:00

27 lines
682 B
EmacsLisp

;;; lang/elm/config.el -*- lexical-binding: t; -*-
(after! elm-mode
(if (featurep! +lsp)
(add-hook 'elm-mode-local-vars-hook #'lsp! 'append)
(set-company-backend! 'elm-mode 'company-elm))
(set-repl-handler! 'elm-mode #'run-elm-interactive)
(set-ligatures! 'elm-mode
:null "null"
:true "true" :false "false"
:int "Int" :str "String"
:float "Float"
:bool "Bool"
:not "not"
:and "&&" :or "||"))
(use-package! flycheck-elm
:when (featurep! :checkers syntax)
:after elm-mode
:config (add-to-list 'flycheck-checkers 'elm))
;; Tree sitter
(eval-when! (featurep! +tree-sitter)
(add-hook! 'elm-mode-local-vars-hook #'tree-sitter!))