[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 6f2b5ee 266/385: font lock CPP
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 6f2b5ee 266/385: font lock CPP |
Date: |
Tue, 5 Oct 2021 23:59:44 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 6f2b5ee3dd3712396b16e1f99d9cb89efef1f1e2
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
font lock CPP
---
haskell-tng-font-lock.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el
index 4504055..ce2fee3 100644
--- a/haskell-tng-font-lock.el
+++ b/haskell-tng-font-lock.el
@@ -63,6 +63,11 @@
"Haskell constructors."
:group 'haskell-tng-faces)
+(defface haskell-tng-cpp-face
+ '((t :inherit font-lock-preprocessor-face))
+ "Uses of CPP"
+ :group 'haskell-tng-faces)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Here is the `font-lock-keywords' table of matchers and highlighters.
(defconst
@@ -75,7 +80,10 @@
(consym haskell-tng--rx-consym)
(qual haskell-tng--rx-qual)
(bigspace `(| space ,haskell-tng--rx-newline)))
- `(;; reservedid / reservedop
+ `((,(rx bol "#" (or "ifdef" "else" "endif") (* nonl) eol)
+ (0 'haskell-tng-cpp-face)) ;; CPP
+
+ ;; reservedid / reservedop
(,haskell-tng--rx-c-reserved
. 'haskell-tng-keyword-face)
@@ -104,8 +112,6 @@
;; TODO bug, multiple standalone instance declarations in a row do not
fire
;; TODO bug \Foo{foo} doesn't highlight correctly
- ;; TODO CPP #ifdef would be nice
-
;; EXT:TypeApplications: It is not easy to disambiguate between type
;; applications and value extractor in a pattern. Needs work.
;; (,(rx-to-string `(: symbol-start "@" (* space)
@@ -296,6 +302,7 @@ succeeds and may further restrict the FIND search limit."
(| (: line-start symbol-start)
(: symbol-start (| "where" "=")
symbol-end))))
+;; TODO TypeFamilies type associations (not at line-start)
(haskell-tng--font-lock-multiline type
(rx line-start "type" word-end)
(rx line-start "type" word-end (group (+
anything)))
- [nongnu] elpa/haskell-tng-mode c3793b2 176/385: canonical until macro, (continued)
- [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, 2021/10/06
- [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 <=
- [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
- [nongnu] elpa/haskell-tng-mode f7e8040 213/385: = ends a type sig, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fe9d65d 222/385: helper for yatemplates, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode bc93c3d 224/385: very alpha hsinspect support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 658ddb6 251/385: docs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 73a60f5 309/385: cache `which hsinspect` per project, ELPA Syncer, 2021/10/06