[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode 618f0fb 163/217: remove 'scala-indent:indent-on
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode 618f0fb 163/217: remove 'scala-indent:indent-on-parentheses in preference of smartparens |
Date: |
Sun, 29 Aug 2021 11:31:04 -0400 (EDT) |
branch: elpa/scala-mode
commit 618f0fbef4d3d94156f834a66e36c79f07a54e02
Author: Sam Halliday <sam.halliday@gmail.com>
Commit: Sam Halliday <sam.halliday@gmail.com>
remove 'scala-indent:indent-on-parentheses in preference of smartparens
(sp-local-pair 'scala-mode "(" nil :post-handlers '(("||\n[i]" "RET")))
(sp-local-pair 'scala-mode "{" nil :post-handlers '(("||\n[i]" "RET") ("|
" "SPC")))
---
README.md | 10 ++++++++++
scala-mode2-indent.el | 5 -----
scala-mode2-map.el | 2 --
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index a86bd4a..08f2a4c 100644
--- a/README.md
+++ b/README.md
@@ -469,6 +469,16 @@ in most files:
(scala-mode:goto-start-of-code)
```
+## Auto parentheses formatting
+
+We recommend using [smartparens](https://github.com/Fuco1/smartparens) to
+automatically format parentheses on insertion, e.g. with
+
+```elisp
+ (sp-local-pair 'scala-mode "(" nil :post-handlers '(("||\n[i]" "RET")))
+ (sp-local-pair 'scala-mode "{" nil :post-handlers '(("||\n[i]" "RET") ("| "
"SPC")))
+```
+
## Other features
- highlights only properly formatted string and character constants
- indenting a code line removes trailing whitespace
diff --git a/scala-mode2-indent.el b/scala-mode2-indent.el
index bb059f7..720a028 100644
--- a/scala-mode2-indent.el
+++ b/scala-mode2-indent.el
@@ -841,11 +841,6 @@ comment is outside the comment region. "
(+ (match-beginning 0) 1)))
(current-column))))
-(defun scala-indent:indent-on-parentheses ()
- (when (and (= (char-syntax (char-before)) ?\))
- (= (save-excursion (back-to-indentation) (point)) (1- (point))))
- (scala-indent:indent-line)))
-
(defconst scala-indent:indent-on-words-re
(concat "^\\s *"
(regexp-opt '("catch" "case" "else" "finally" "yield") 'words)))
diff --git a/scala-mode2-map.el b/scala-mode2-map.el
index 70e3ae4..e6cfc5c 100644
--- a/scala-mode2-map.el
+++ b/scala-mode2-map.el
@@ -13,8 +13,6 @@
(defun scala-mode-map:add-self-insert-hooks ()
(add-hook 'post-self-insert-hook
- 'scala-indent:indent-on-parentheses)
- (add-hook 'post-self-insert-hook
'scala-indent:indent-on-special-words)
(add-hook 'post-self-insert-hook
'scala-indent:indent-on-scaladoc-asterisk)
- [nongnu] elpa/scala-mode 69e071e 140/217: scala-syntax:forward-modifiers: Unmatched [ or [^ error, (continued)
- [nongnu] elpa/scala-mode 69e071e 140/217: scala-syntax:forward-modifiers: Unmatched [ or [^ error, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d8a141b 125/217: Makefile clean-up, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 34888c0 142/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode f03a582 141/217: Merge pull request #83 from ancane/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 461f9a5 134/217: Fix issue #63 and names with _ and reserved word, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ababc73 151/217: remove interactive, update filename., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 27efa44 019/217: updated README, added LICENSE, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d6f8cee 135/217: scala 2.10 preamble, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 03cfbe4 148/217: Add types to index items., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ed645d2 153/217: move create index function for imenu to big setq with everything else., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 618f0fb 163/217: remove 'scala-indent:indent-on-parentheses in preference of smartparens,
ELPA Syncer <=
- [nongnu] elpa/scala-mode 56cba29 194/217: Fix bad syntax when `*/` is prefixed by an opcode. (#143), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a1ff6f3 202/217: feat: add Scala 3 keywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 46bb948 198/217: Fix #155, remove ob-scala.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a2a1b1d 208/217: compile mode with sbt thin client, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 54fa36f 200/217: Merge pull request #159 from kpbochenek/fix-files-association-alist, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5058a85 204/217: doc: clarify Scala versions supported, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0c5ed9e 022/217: deleted example files, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 61a511f 021/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode fe5c2c4 031/217: Fixes #11: was still using the slow regexp, not faster, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 1a3d958 029/217: forward/backward-sexp, ELPA Syncer, 2021/08/29