spacemacs/layers/+lang/scala/funcs.el
syl20bnr dd85084826 java: multiple backends support
Define multiple dispatch functions for each service:
- spacemacs//java-setup-backend
- spacemacs//java-setup-auto-completion
- spacemacs//java-setup-syntax-checking
- spacemacs//java-setup-spell-checking
- spacemacs//java-setup-eldoc

java: replace ensime-configure-keybindings function by a variable

It's not convenient to have key bindings in funcs.el file, instead of relying
on a function we define a private layer variable java--ensime-modes which
can be updated by other layers using a :pre-config use-package hook.

java: refactor key bindings

- define key bindings for meghanada back-end
- move ensime key bindings documentation from scala layer to java layer
- change SPC m d for daemon to SPC m D (since SPC m d is reserved for debugging)
2017-03-19 12:40:36 -04:00

39 lines
1.1 KiB
EmacsLisp

;;; funcs.el --- Scala Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defun spacemacs//scala-setup-ensime ()
"Setup ENSIME for Scala."
(spacemacs//java-setup-ensime))
(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))))