Add lang/sml module

Closes #1947
This commit is contained in:
Henrik Lissner 2020-03-29 19:40:03 -04:00
parent 3a370343e2
commit 33b95c628a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 76 additions and 0 deletions

View file

@ -136,6 +136,7 @@ Modules that bring support for a language or group of languages to Emacs.
+ scala =+lsp= - TODO + scala =+lsp= - TODO
+ [[file:../modules/lang/scheme/README.org][scheme]] - TODO + [[file:../modules/lang/scheme/README.org][scheme]] - TODO
+ [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp= - TODO + [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp= - TODO
+ [[file:../modules/lang/sml/README.org][sml]] - TODO
+ [[file:../modules/lang/solidity/README.org][solidity]] - TODO + [[file:../modules/lang/solidity/README.org][solidity]] - TODO
+ swift =+lsp= - TODO + swift =+lsp= - TODO
+ terra - TODO + terra - TODO

View file

@ -152,6 +152,7 @@
;;scala ; java, but good ;;scala ; java, but good
;;scheme ; a fully conniving family of lisps ;;scheme ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No. ;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables? ;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance. ;;terra ; Earth and Moon in alignment for performance.

View file

@ -0,0 +1,39 @@
#+TITLE: lang/sml
#+DATE: March 29, 2020
#+SINCE: v3.0
#+STARTUP: inlineimages nofold
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#troubleshooting][Troubleshooting]]
* Description
This module has no description yet.
** Maintainers
This module has no dedicated maintainers.
** Module Flags
This module provides no flags.
** Plugins
+ sml-mode
+ company-mlton (=:completion company=)
* TODO Prerequisites
# Document how to install sml program and MLton
* TODO Features
# An in-depth list of features, how to use them, and their dependencies.
* TODO Configuration
# How to configure this module, including common problems and how to address them.
* TODO Troubleshooting
# Common issues and their solution, or places to look for help.

View file

@ -0,0 +1,27 @@
;;; 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 "M-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 (featurep! :completion company)
:hook (sml-mode . company-mlton-init))

View file

@ -0,0 +1,8 @@
;; -*- no-byte-compile: t; -*-
;;; lang/sml/packages.el
(package! sml-mode :pin "60b01d7ebc")
(when (featurep! :completion company)
(package! company-mlton
:recipe (:host github :repo "MatthewFluet/company-mlton" :files ("*.el" "*.basis"))
:pin "b87e36348f"))