featurep! will be renamed modulep! in the future, so it's been deprecated. They have identical interfaces, and can be replaced without issue. featurep! was never quite the right name for this macro. It implied that it had some connection to featurep, which it doesn't (only that it was similar in purpose; still, Doom modules are not features). To undo such implications and be consistent with its namespace (and since we're heading into a storm of breaking changes with the v3 release anyway), now was the best opportunity to begin the transition.
29 lines
999 B
EmacsLisp
29 lines
999 B
EmacsLisp
;;; lang/sml/config.el -*- lexical-binding: t; -*-
|
|
|
|
(use-package! sml-mode
|
|
:mode "\\.s\\(?:ml\\|ig\\)\\'"
|
|
:config
|
|
(set-repl-handler! 'sml-mode #'run-sml)
|
|
|
|
;; don't auto-close apostrophes (type 'a = foo) and backticks (`Foo)
|
|
(sp-with-modes 'sml-mode
|
|
(sp-local-pair "'" nil :actions nil)
|
|
(sp-local-pair "`" nil :actions nil))
|
|
|
|
(map! :map sml-mode-map
|
|
:i "RET" #'reindent-then-newline-and-indent
|
|
:i "S-SPC" #'sml-electric-space
|
|
:i "|" #'sml-electric-pipe
|
|
:localleader
|
|
:desc "Run SML" "'" #'run-sml
|
|
:prefix ("e" . "eval")
|
|
:desc "Run buffer" "b" #'sml-prog-proc-send-buffer
|
|
:desc "Run the paragraph" "f" #'sml-send-function
|
|
:desc "Run region" "r" #'sml-prog-proc-send-region))
|
|
|
|
|
|
(use-package! company-mlton
|
|
:when (modulep! :completion company)
|
|
:hook (sml-mode . company-mlton-init)
|
|
:config
|
|
(set-company-backend! 'sml-mode company-mlton-grouped-backend))
|