2017-06-08 11:47:56 +02:00
|
|
|
;;; lang/elm/config.el -*- lexical-binding: t; -*-
|
2017-05-20 18:11:34 -07:00
|
|
|
|
2018-06-02 21:42:11 +02:00
|
|
|
(after! elm-mode
|
2022-08-12 20:29:19 +02:00
|
|
|
(if (modulep! +lsp)
|
2022-03-24 02:19:52 +01:00
|
|
|
(add-hook 'elm-mode-local-vars-hook #'lsp! 'append)
|
2020-04-22 17:25:30 -04:00
|
|
|
(set-company-backend! 'elm-mode 'company-elm))
|
2022-07-25 17:34:44 +02:00
|
|
|
|
2022-08-12 20:29:19 +02:00
|
|
|
(when (modulep! +tree-sitter)
|
2022-07-25 17:34:44 +02:00
|
|
|
(add-hook 'elm-mode-local-vars-hook #'tree-sitter! 'append))
|
2020-04-22 17:25:30 -04:00
|
|
|
|
2018-06-16 19:32:25 +02:00
|
|
|
(set-repl-handler! 'elm-mode #'run-elm-interactive)
|
2020-08-12 18:52:14 -04:00
|
|
|
(set-ligatures! 'elm-mode
|
2018-06-16 19:32:25 +02:00
|
|
|
:null "null"
|
|
|
|
:true "true" :false "false"
|
|
|
|
:int "Int" :str "String"
|
|
|
|
:float "Float"
|
|
|
|
:bool "Bool"
|
|
|
|
:not "not"
|
2023-03-13 15:54:46 +09:00
|
|
|
:and "&&" :or "||")
|
2017-05-25 20:11:24 +02:00
|
|
|
|
2023-03-13 15:54:46 +09:00
|
|
|
(map! :map elm-mode-map
|
|
|
|
:localleader
|
|
|
|
(:prefix ("m" . "elm make")
|
|
|
|
:desc "Compile HTML" "m" #'+elm/compile-html
|
|
|
|
:desc "Compile HTML (optimized)" "M" #'+elm/compile-html-optimized
|
|
|
|
:desc "Compile JS" "j" #'+elm/compile-js
|
|
|
|
:desc "Compile JS (optimized)" "J" #'+elm/compile-js-optimized)))
|
2017-05-20 18:11:34 -07:00
|
|
|
|
2019-07-23 12:44:03 +02:00
|
|
|
(use-package! flycheck-elm
|
2022-08-17 01:16:08 +01:00
|
|
|
:when (and (modulep! :checkers syntax)
|
|
|
|
(not (modulep! :checkers syntax +flymake)))
|
2018-05-07 18:26:30 +02:00
|
|
|
:after elm-mode
|
2020-04-22 17:25:30 -04:00
|
|
|
:config (add-to-list 'flycheck-checkers 'elm))
|