branch: elpa/haskell-tng-mode
commit 36ece6d87a84b77e0ef09e48f3825e7fba0addd0
Author: Tseen She <[email protected]>
Commit: Tseen She <[email protected]>
low hanging fruit
---
README.md | 7 +++++--
haskell-tng-compile.el | 6 ++++--
haskell-tng-mode.el | 17 ++++++++++++++++-
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index b2b64be..96c439d 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ This is the status of core features:
- [x] performance-minded `syntax-table`
- [x] `font-lock` to visually distinguish types and values
- [x] `sexp` navigation (SMIE)
- - [ ] `projectile` / [`fast-tags`](https://github.com/elaforge/fast-tags)
integration for `TAGS`
+ - [x] `projectile` / [`fast-tags`](https://github.com/elaforge/fast-tags)
integration for `TAGS`
- [ ] hoogle CLI jump-to-source
- [ ] `imenu` population
- Editing:
@@ -60,8 +60,11 @@ This is the status of core features:
- [ ] `yasnippet` templates
- [ ] `LANGUAGE` management
- [ ] `import` management (via hoogle and
[`hsimport`](https://hackage.haskell.org/package/hsimport))
+ - [x] `prettify-symbols` emulating `UnicodeSyntax`
+ - [x] `stylish-haskell` support
- Compiling:
- - [ ] `compilation-mode` for `cabal` batch commands (IN PROGRESS)
+ - [x] `haskell-tng-compile` for `cabal` batch commands
+ - [x] `stack` support (via `stack2cabal`)
- [ ] `comint-mode` based `ghc` repl
Compatibility with `lsp-mode` /
[`haskell-ide-engine`](https://github.com/haskell/haskell-ide-engine) is
important for more advanced IDE features.
diff --git a/haskell-tng-compile.el b/haskell-tng-compile.el
index 0aad467..bfc311c 100644
--- a/haskell-tng-compile.el
+++ b/haskell-tng-compile.el
@@ -38,7 +38,8 @@ command, otherwise the last command is used.
The command history is global across all Haskell files.
-A universal argument will invoke `haskell-tng-compile:alt'."
+A universal argument will invoke `haskell-tng-compile:alt', which
+will cause the subsequent call to prompt."
(interactive "P")
(save-some-buffers (not compilation-ask-about-save)
compilation-save-buffers-predicate)
@@ -50,7 +51,8 @@ A universal argument will invoke `haskell-tng-compile:alt'."
"Compile command: "
(or last (car haskell-tng-compile:history))
'(haskell-tng-compile:history . 1))))))
- (setq-local haskell-tng-compile:command command)
+ (setq haskell-tng-compile:command
+ (unless (equal command haskell-tng-compile:alt) command))
(when-let (default-directory
(haskell-tng:locate-dominating-file
diff --git a/haskell-tng-mode.el b/haskell-tng-mode.el
index 8047f9e..7ecef2c 100644
--- a/haskell-tng-mode.el
+++ b/haskell-tng-mode.el
@@ -25,6 +25,16 @@
"Haskell support: The Next Generation."
:group 'languages)
+(defcustom haskell-tng-mode:prettify-symbols
+ '(("forall" . ?∀))
+ "Integration with `prettify-symbols' giving the impression of UnicodeSyntax.
+
+Load `prettify-symbols-mode' in `haskell-tng-mode-hook'."
+ :type 'listp)
+
+;; optional dependency on projectile for TAGS management
+(defvar projectile-tags-command)
+
;;;###autoload
(define-derived-mode haskell-tng-mode prog-mode "Hask"
"Major mode for editing Haskell programs."
@@ -64,7 +74,12 @@
font-lock-extend-region-functions haskell-tng:extend-region-functions
;; whitespace is meaningful, no electric indentation
- electric-indent-inhibit t)
+ electric-indent-inhibit t
+
+ ;; integrations
+ prettify-symbols-alist haskell-tng-mode:prettify-symbols
+ projectile-tags-command "fast-tags -Re --exclude=dist-newstyle ."
+ )
(haskell-tng-smie:setup))