[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 499c77f 261/385: abbrev-mode support
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 499c77f 261/385: abbrev-mode support |
Date: |
Tue, 5 Oct 2021 23:59:43 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 499c77f5573abe0f948f2bf929961c127d302def
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
abbrev-mode support
---
README.md | 2 +-
haskell-tng-contrib-abbrev.el | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 222ee98..474bb95 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,7 @@ A full installation may look like the following
:config
(require 'haskell-tng-hsinspect)
(require 'haskell-tng-contrib)
+ (require 'haskell-tng-contrib-abbrev)
(require 'haskell-tng-contrib-company)
(require 'haskell-tng-contrib-projectile)
(require 'haskell-tng-contrib-smartparens)
@@ -163,7 +164,6 @@ This is the status of core features:
- and [`hlint`](https://github.com/ndmitchell/hlint)
- and for faster feedback, [`ghcid`](https://github.com/ndmitchell/ghcid)
- [visualise values as
types](https://twitter.com/jyothsnasrin/status/1039530556080283648)
-- are there any sensible `abbrev-mode` defaults?
- [`djinn`](https://hackage.haskell.org/package/djinn) /
[`justdoit`](https://hackage.haskell.org/package/ghc-justdoit) integration
- [`pointfree`](https://hackage.haskell.org/package/pointfree) integration
- is there a solution to thinking "right to left" vs writing "left to right"?
(easy left token movement?)
diff --git a/haskell-tng-contrib-abbrev.el b/haskell-tng-contrib-abbrev.el
new file mode 100644
index 0000000..4807aa1
--- /dev/null
+++ b/haskell-tng-contrib-abbrev.el
@@ -0,0 +1,31 @@
+;;; haskell-tng-contrib-abbrev.el --- abbrev-mode integration -*-
lexical-binding: t -*-
+
+;; Copyright (C) 2019 Tseen She
+;; License: GPL 3 or any later version
+
+;;; Commentary:
+;;
+;; Some useful abbrev-mode expansions.
+;;
+;;; Code:
+
+(require 'abbrev)
+(require 'skeleton)
+(require 'haskell-tng-mode)
+
+(define-skeleton haskell-tng--skeleton-case-of
+ "case...of boilerplate"
+ nil "case " _ " of")
+
+(define-abbrev
+ haskell-tng-mode-abbrev-table
+ "case" "" #'haskell-tng--skeleton-case-of)
+
+(add-hook
+ 'haskell-tng-mode-hook
+ (lambda ()
+ ;; TODO disable the request to save the abbrev table
+ (abbrev-mode 1)))
+
+(provide 'haskell-tng-contrib-abbrev)
+;;; haskell-tng-contrib-abbrev.el ends here
- [nongnu] elpa/haskell-tng-mode ca00f1f 183/385: thot, (continued)
- [nongnu] elpa/haskell-tng-mode ca00f1f 183/385: thot, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 611711a 208/385: address melpa review, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 89c5c80 223/385: improve smartparens workaround, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e270647 228/385: more robust calls to hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ad5967b 236/385: simpler installation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 599d4f0 283/385: import symbol at point, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 9b334f7 275/385: ghcflags, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f221f95 173/385: introduce types and constraints to the grammar, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ae1d399 268/385: backslashes are only keywords when used in lambdas, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1d74d5f 279/385: backslash bughunting, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 499c77f 261/385: abbrev-mode support,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode e2e3490 382/385: hide-show supports BOILERPLATE START ... BOILERPLATE END, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a34e796 368/385: improve debugging, ELPA Syncer, 2021/10/06