[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode d1fbe2d 171/217: Implemented prettify/conceal w
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode d1fbe2d 171/217: Implemented prettify/conceal with a base set of rules. (#108) |
Date: |
Sun, 29 Aug 2021 11:31:06 -0400 (EDT) |
branch: elpa/scala-mode
commit d1fbe2d2155c1d74a3d3cabe4a0d63c8bb283cbf
Author: Merlin Göttlinger <megoettlinger@gmail.com>
Commit: Sam Halliday <sam.halliday@gmail.com>
Implemented prettify/conceal with a base set of rules. (#108)
* Initial set of prettify rules
* Renamed prettify to prettify-symbols
* Removed automatic hook in favor of manualyy added hook when required
* Added utf-8 annotation and fixed comment
* Defcustom instead of const and added a few rules
---
scala-mode2-prettify-symbols.el | 74 +++++++++++++++++++++++++++++++++++++++++
scala-mode2.el | 1 +
2 files changed, 75 insertions(+)
diff --git a/scala-mode2-prettify-symbols.el b/scala-mode2-prettify-symbols.el
new file mode 100644
index 0000000..fe4d8fa
--- /dev/null
+++ b/scala-mode2-prettify-symbols.el
@@ -0,0 +1,74 @@
+;;; scala-mode2-prettify-symbols.el - Extension of scala-mode for prettifying
scala symbols/code
+;;; Copyright (c) 2016 Merlin Göttlinger
+;;; For information on the License, see the LICENSE file
+;; -*- coding: UTF-8 -*-
+
+(defcustom scala-mode-pretty-bool-alist '(
+ ("<=" . ?≤)
+ (">=" . ?≥)
+ ("==" . ?≡)
+ ("===" . ?≣)
+ ("!" . ?¬)
+ ("!=" . ?≢)
+ ("&&" . ?∧)
+ ("||" . ?∨)
+ ("true" . ?⊤)
+ ("false" . ?⊥)
+ ("Boolean" . ?𝔹))
+ "Prettify rules for boolean related operations."
+ :type 'alist)
+
+(defcustom scala-mode-pretty-collection-alist '(
+ ("empty" . ?∅)
+ ("sum" . ?∑)
+ ("product" . ?∏)
+ ("contains" . ?∍)
+ ("forall" . ?∀)
+ ("any" . ?∃)
+ ("intersect" . ?∩)
+ ("union" . ?∪)
+ ("diff" . ?≏)
+ ("subsetOf" . ?⊆)
+ ("++" . ?⧺)
+ ("::" . ?⸬)
+ ("--" . ?╌))
+ "Prettify rules for collections related operations."
+ :type 'alist)
+
+(defcustom scala-mode-pretty-arrows-alist'(
+ ("->" . ?→)
+ ("<-" . ?←)
+ ("=>" . ?⇒)
+ ;("<=" . ?⇐)
+ ("<=>" . ?⇔)
+ ("-->" . ?⟶)
+ ("<->" . ?↔)
+ ("<--" . ?⟵)
+ ("<-->" . ?⟷)
+ ("==>" . ?⟹)
+ ("<==" . ?⟸)
+ ("<==>" . ?⟺)
+ ("~>" . ?⇝)
+ ("<~" . ?⇜))
+ "Prettify rules for arrow related code pieces."
+ :type 'alist)
+
+(defcustom scala-mode-pretty-misc-alist '(
+ ;("null" . ?∅)
+ ;("Nothing" . ?∅)
+ ("Unit" . ?∅)
+ ("Int" . ?ℤ)
+ ("assert" . ?⊦)
+ (":=" . ?≔))
+ "Prettify rules for other mixed code pieces."
+ :type 'alist)
+
+(defcustom scala--prettify-symbols-alist (append
+ scala-mode-pretty-bool-alist
+ scala-mode-pretty-collection-alist
+ scala-mode-pretty-arrows-alist
+ scala-mode-pretty-misc-alist)
+ "All prettify rules to be applied in scala code."
+ :type 'alist)
+
+(provide 'scala-mode2-prettify-symbols)
diff --git a/scala-mode2.el b/scala-mode2.el
index 886dc4a..a0158c0 100644
--- a/scala-mode2.el
+++ b/scala-mode2.el
@@ -21,6 +21,7 @@
(require 'scala-mode2-map)
(require 'scala-mode2-sbt)
(require 'scala-mode2-imenu)
+(require 'scala-mode2-prettify-symbols)
;; Tested only for emacs 24
(unless (<= 24 emacs-major-version)
- [nongnu] elpa/scala-mode 0c39da9 114/217: upgraded version to 0.22 since we added new functionality required by sbt-mode, (continued)
- [nongnu] elpa/scala-mode 0c39da9 114/217: upgraded version to 0.22 since we added new functionality required by sbt-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode df36b5c 117/217: fix README.md text, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c21f88f 124/217: Merge pull request #61 from nicferrier/marmalade, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f431bb3 123/217: remove the attempt at checking executables, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 13ad3ac 132/217: Added Jim Powers to list of contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d27a39b 130/217: added Tillmann Rendel to the list of commiters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f5280ad 137/217: forward-token for #75, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e6967f7 154/217: Add Ivan Malison as a contributor., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3953269 127/217: Tweaked syntax rules to make highlighting more customizeable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c0842f6 157/217: Use cl functions to avoid mapcan missing error., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d1fbe2d 171/217: Implemented prettify/conceal with a base set of rules. (#108),
ELPA Syncer <=
- [nongnu] elpa/scala-mode 2e8fd35 180/217: Fix for fill-paragraph with prefix arg. Fixes #125. (#126), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 7e63002 182/217: Add "inline" keyword from scalameta (#128), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1357eba 183/217: Fix for #94, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 730e16d 186/217: Merge pull request #130 from ensime/fix/120, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1dd5825 085/217: Added comment syntax for bash preambles (#!...!#) in scala script files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 16d6f36 067/217: Added a not to README about font-lock-doc-face, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b55ca83 066/217: Merge pull request #23 from hvesalai/issue22, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode aa38dae 083/217: Fixes #38: 100% CPU usage for multi-line strings in some cases., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0af3b07 069/217: Added Makefile and fixed compilation warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode be89855 084/217: Multi-line comment indentation and asterisk-insertion on mid-line return., ELPA Syncer, 2021/08/29