-
Notifications
You must be signed in to change notification settings - Fork 3
/
funcs.el
32 lines (30 loc) · 1.05 KB
/
funcs.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;;; funcs.el --- Scala(lsp) Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;; Copyright (c) 2019 Rodolfo Hansen & Zhe Li
;;
;; Author: Zhe Li <linuxcity.jn@gmail.com>
;; URL: https://github.com/zheli/layer-scala-lsp
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun spacemacs//scala-disable-flycheck-scala ()
(push 'scala flycheck-disabled-checkers))
(defun spacemacs/scala-join-line ()
"Adapt `scala-indent:join-line' to behave more like evil's line join.
`scala-indent:join-line' acts like the vanilla `join-line',
joining the current line with the previous one. The vimmy way is
to join the current line with the next.
Try to move to the subsequent line and then join. Then manually move
point to the position of the join."
(interactive)
(let (join-pos)
(save-excursion
(goto-char (line-end-position))
(unless (eobp)
(forward-line)
(call-interactively 'scala-indent:join-line)
(setq join-pos (point))))
(when join-pos
(goto-char join-pos))))