[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 4cbf702 205/385: move third party deps to
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 4cbf702 205/385: move third party deps to -contrib |
Date: |
Tue, 5 Oct 2021 23:59:32 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 4cbf702a023b724753406629794e866c6e53c157
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
move third party deps to -contrib
---
Cask | 1 +
README.md | 10 ++++------
haskell-tng-contrib.el | 34 ++++++++++++++++++++++++++++++++++
haskell-tng-mode.el | 31 +------------------------------
4 files changed, 40 insertions(+), 36 deletions(-)
diff --git a/Cask b/Cask
index 68f409a..02fcf2b 100644
--- a/Cask
+++ b/Cask
@@ -28,6 +28,7 @@
(depends-on "faceup")
(depends-on "ert-runner")
(depends-on "undercover")
+ (depends-on "projectile")
(depends-on "smartparens")
(depends-on "yasnippet"))
diff --git a/README.md b/README.md
index cd14894..d46bff4 100644
--- a/README.md
+++ b/README.md
@@ -39,12 +39,13 @@ Check out the source code repository and add to your load
path:
```lisp
(add-to-list 'load-path (expand-file-name "~/Projects/haskell-tng.el/"))
(require 'haskell-tng-mode)
-(require 'haskell-tng-contrib) ;; optional
```
Integrations are provided for common libraries, enable them with
```lisp
+(require 'haskell-tng-contrib)
+
(add-hook
'haskell-tng-mode-hook
(lambda ()
@@ -62,7 +63,7 @@ Integrations are provided for common libraries, enable them
with
- `C-- C-c c` clean project
- `C-c e` jump to error
-### Contrib / Third Party
+### Contrib
- `C-c C-C` invoke
[`stack2cabal`](https://hackage.haskell.org/package/stack2cabal)
- `C-c C-r f` invoke
[`stylish-haskell`](https://hackage.haskell.org/package/stylish-haskell)
@@ -80,10 +81,7 @@ This is the status of core features:
- [ ] `imenu` population
- Editing:
- [x] indentation
- - [x] `prettify-symbols` emulating `UnicodeSyntax`
- - [x] `smartparens` rules
- - [x] `yasnippet` templates
- - [x] `stylish-haskell` support
+ - [x] `prettify-symbols` to emulate `UnicodeSyntax`
- Compiling:
- [x] `haskell-tng-compile` for `cabal` batch commands
- [x] `stack`, `nix`, `shake`, etc support (customise
`haskell-tng--compile-*`)
diff --git a/haskell-tng-contrib.el b/haskell-tng-contrib.el
index 5bc1f2e..681b088 100644
--- a/haskell-tng-contrib.el
+++ b/haskell-tng-contrib.el
@@ -12,6 +12,13 @@
(require 'subr-x)
+(require 'haskell-tng-util)
+
+;; optional third party dependencies
+(require 'projectile nil t)
+(require 'smartparens nil t)
+(require 'yasnippet nil t)
+
;; TODO a generic wrapper around commands that can be downloaded and built
using
;; cabal v2-install.
@@ -33,5 +40,32 @@
(call-process "stack2cabal")))
(defalias 'stack2cabal 'haskell-tng-stack2cabal)
+;;;###autoload
+(progn
+ (when (boundp yas-minor-mode)
+ (add-to-list
+ 'yas-snippet-dirs
+ (expand-file-name
+ "snippets"
+ (haskell-tng--util-this-lisp-directory)))
+ (yas-reload-all nil t))
+
+ (when (fboundp 'sp-local-pair)
+ (dolist (pair '(("(" . ")")
+ ("[" . "]")
+ ("{" . "}")
+ ("{-" . "-}")
+ ("{-#" . "#-}")))
+ (sp-local-pair 'haskell-tng-mode (car pair) (cdr pair)
+ :post-handlers '(("| " "SPC")))))
+
+ (add-hook
+ 'haskell-tng-mode
+ (lambda ()
+ (when (boundp projectile-mode)
+ (setq-local projectile-tags-command "fast-tags -Re
--exclude=dist-newstyle .")))
+
+ ))
+
(provide 'haskell-tng-contrib)
;;; haskell-tng-contrib.el ends here
diff --git a/haskell-tng-mode.el b/haskell-tng-mode.el
index e2ee51f..a0fc5e9 100644
--- a/haskell-tng-mode.el
+++ b/haskell-tng-mode.el
@@ -33,9 +33,6 @@ Load `prettify-symbols-mode' in `haskell-tng-mode-hook'."
:type 'listp
:group 'haskell-tng)
-;; 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."
@@ -81,7 +78,6 @@ Load `prettify-symbols-mode' in `haskell-tng-mode-hook'."
;; indentation, so it's best to just make sure it is disabled.
(electric-indent-mode 0)
- (setq-local projectile-tags-command "fast-tags -Re --exclude=dist-newstyle
.")
(setq-local smie-blink-matching-inners nil) ;; c.f. `smie-closer-alist'
(haskell-tng--smie-setup)
@@ -102,32 +98,7 @@ Load `prettify-symbols-mode' in `haskell-tng-mode-hook'."
;;;###autoload
(progn
(add-to-list 'auto-mode-alist '("\\.hs\\'" . haskell-tng-mode))
- (modify-coding-system-alist 'file "\\.hs\\'" 'utf-8)
-
- ;; optional dependency
- (require 'yasnippet nil t)
- (when (boundp yas-minor-mode)
- (add-hook
- 'yas-minor-mode-hook
- (lambda ()
- (add-to-list
- 'yas-snippet-dirs
- (expand-file-name
- "snippets"
- (haskell-tng--util-this-lisp-directory)))
- (yas-reload-all nil t))))
-
- ;; optional dependency
- (require 'smartparens nil t)
- (when (fboundp 'sp-local-pair)
- (dolist (pair '(("(" . ")")
- ("[" . "]")
- ("{" . "}")
- ("{-" . "-}")
- ("{-#" . "#-}")))
- (sp-local-pair 'haskell-tng-mode (car pair) (cdr pair)
- :post-handlers '(("| " "SPC")))))
- )
+ (modify-coding-system-alist 'file "\\.hs\\'" 'utf-8))
(provide 'haskell-tng-mode)
;;; haskell-tng-mode.el ends here
- [nongnu] elpa/haskell-tng-mode f5d76fc 348/385: tidy docs, (continued)
- [nongnu] elpa/haskell-tng-mode f5d76fc 348/385: tidy docs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3b37524 360/385: bugfix for qualified imports when the cache was bad, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fe2b164 372/385: fix the build, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 63225d5 374/385: use .ghc.path to find hsinspect, build tool agnostic, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3d1122b 116/385: notes on regexps, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c3793b2 176/385: canonical until macro, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b7cb5b9 214/385: starting to create imenu, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5306ae2 217/385: fix type faces with constraints, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5f81d6b 219/385: bump python version, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8f4d7fc 225/385: advice around smartparens workaround, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4cbf702 205/385: move third party deps to -contrib,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 3ff278e 227/385: ability to not continue comments, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode dbcef71 235/385: workaround the env file situation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5892c04 232/385: small things, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 44dc467 248/385: notes on motivation, contributing and collaboration, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6f2b5ee 266/385: font lock CPP, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fdbd0a2 239/385: updates for hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b2e2c3a 293/385: stop stack from being an asshole, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ee07f6d 172/385: type indentation tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 59354b6 198/385: support hanging type alignment, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a788ab2 209/385: more efficient layout caching, ELPA Syncer, 2021/10/06