Commit Graph

60 Commits

Author SHA1 Message Date
duianto ee811f7b13 Unify packages list parentheses style
problem:
some layer packages lists have the open and closing parentheses on the same line
as the first and last listed package, but most seem to have them on a separate
lines.

solution:
put the open and close parentheses on separate lines, except for lists with only
a single package, they are written on the same line as the variable name and
parentheses.

fix the lists indentation
2018-11-21 21:35:38 +00:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
Robbert van der Helm c61ae1a1c1 Add ivy support to the gtags layer
It would be much better to have a single function for each layer that
initializes ggtags, helm-gtags and counsel-gtags for a mode.
2017-12-17 22:03:01 -05:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Joao Azevedo 81aed5a423 Allow customizing if ENSIME should print types at point
The `scala-enable-eldoc` variable should be used to determine whether or not
ENSIME should print types at point. This makes sure that the hook is only set if
the variable is non-nil.
2017-05-14 13:07:09 -04:00
Andre Silva ed8772fb93 scala: fix flyspell setup 2017-03-27 13:14:28 +01:00
syl20bnr f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
2017-03-19 12:40:36 -04:00
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
syl20bnr 40b996edff java: delete ensime layer and import it into java layer
Make scala layer depends on java layer.
2017-03-19 12:40:36 -04:00
Tor Hedin Brønner dcba84bff4 Move initialization code to ensime layer 2017-03-19 12:40:36 -04:00
Tor Hedin Brønner a5d6171c28 Move keybinding setup to the ensime layer 2017-03-19 12:40:36 -04:00
Tor Hedin Brønner 5199ddbfcf Rename moved scala functions
Functions under the ensime layer should start with `ensime/'
2017-03-19 12:40:36 -04:00
Tor Hedin Brønner ab0ec8a777 Move ensime to it's own layer 2017-03-19 12:40:36 -04:00
syl20bnr 87cd00eac7 conventions: update debug conventions
Step in and Step out are now, i and o respectively.
Inspect a value is now v.
Next step is now s.

These new conventions better fit evilificiation.
2017-02-12 13:02:55 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
Dennis Brakhane a13471447f
Update ensime variable name
user-emacs-ensime-directory was renamed to ensime-startup-dirname
2016-11-12 14:58:17 +02:00
yanchengyang 9e52974e90 remove invalid keybindings of ensime 2016-10-17 13:22:10 +02:00
syl20bnr ffc312b2b1 scala: move SPC m b h to SPC m b .
Per convention for transient states
2016-10-03 00:23:15 -04:00
syl20bnr 9066d073b2 Fix (void-variable spacemacs-jump-handlers-....)
Move the variable definitions to config.el and eval-after-load the
key binding on SPC m g g.
2016-09-04 22:31:47 -04:00
syl20bnr c6a6c41d92 Replace hooks by regular list for jump lists
Hook semantic is to be used with run-hooks API and run all hooks
sequentially, jump list semantic is different since the running
functions are not guaranteed to be executed so we prefer using regular
list API to manage jump-lists.
2016-09-04 12:28:40 -04:00
Eivind Fonn b8ca74e4b3 scala: fix sbt-hydra config and move to “bh” 2016-08-22 21:32:38 +02:00
Danny Navarro 3263860669 scala: add SPC m x for sbt-hydra
sbt-hydra:hydra renamed to sbt-hydra in key binding.
2016-08-22 21:22:31 +02:00
Eivind Fonn 5a869764dd Further improve gtags layer
- Add option to disable by default
- Use local-vars hook to allow per-project enable/disable
- Don’t enable helm-gtags-mode (no need)
- Move emacs bindings from helm-gtags-mode-map to ggtags-mode-map
2016-08-22 15:11:25 +02:00
Eivind Fonn 928983da47 Refactor jump to definition
This commit defines:

- spacemacs-default-jump-handlers: a list of functions that can jump to
  definition in ALL modes.

- spacemacs-jump-handlers-MODE: a list of functions that can jump to
  definition in MODE.

- spacemacs-jump-handlers: a buffer-local list of functions that can
  jump to definition. This is made up of the values of the two previous
  variables whenever a given major mode is activated.

- spacemacs/jump-to-definition: a function that tries each function in
  spacemacs-jump-handlers in order, and stops when one of them takes us
  somewhere new.

- spacemacs|define-jump-handlers: a macro that
  * defines spacemacs-jump-handlers-MODE, possibly filled with initial
    functions
  * defines a function that is added to the hook of the given MODE
  * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition

This is an attempt to harmonize all the different approaches to jumping.
Specifically,

- Existing intelligent jump packages that work for only a single mode
  should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
  anaconda for python, ensime for scala, etc.

- Packages like gtags that work for several modes (but potentially not
  all) and which is dumber than the intelligent jumpers should go the
  the END of spacemacs-jump-handlers-MODE.

- Packages like dumb-jump that work for all modes should go to
  spacemacs-default-jump-handlers.

In all cases the order of the jump handlers in each list should be from
most to least intelligent.

Fixes #6619
2016-08-22 15:08:25 +02:00
Diego Alvarez 80f8c84d64 Improve documentation for scalastyle 2016-07-25 14:09:22 +09:00
Christian E. Hopps b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +02:00
syl20bnr 136e1ee237 scala: defer ensime package and add note for scala-mode-hook 2016-07-05 00:23:16 -04:00
Diego Alvarez e677682d1a Remove unnecessary command
as this upstream commit is already doing it:
706aa5e40b
2016-07-05 00:23:16 -04:00
Tony Lotts 768371b6fb Load Scala for org-babel 2016-07-05 00:23:16 -04:00
syl20bnr 7ca7f2827a scala: change back key bindings to SPC m h
For printing types, those key bindings are standard in spacemacs.
2016-06-05 00:44:51 -04:00
Diego Alvarez ed1c3d2d35 Using new upstream commands
- Improve copy to clipboard
- changed and added a few commands keymap
2016-06-05 00:38:29 -04:00
Jean-Martin Archer 71c731aaf6 Use scala-mode instead of scala-mode-2 which is deprecated 2016-05-29 22:53:19 -04:00
Diego Alvarez 9cb0c1e109 Use new command to generate config
Old command doesn't exist anymore
2016-05-27 00:32:05 -04:00
Eivind Fonn 3a6db330a8 scala: Remove superfluous variable 2016-05-06 13:35:10 +02:00
tintin eabd3b859b Add java-doc-style config to scala layer 2016-05-06 13:32:03 +02:00
syl20bnr 99d9993171 Scala: fix ensime-typecheck-current-file to ensime-typecheck-current-buffer 2016-04-04 21:52:45 -04:00
syl20bnr 07b3bb051e scala: lazy load sbt-mode 2016-04-03 00:35:35 -04:00
Diego Alvarez 9b460f60e4 Add function to insert types and add yank type at point
- `, i y` Add function to yank type at point but just yank type name without full
package

- `, r a` Add function to insert type for declaration,
see `https://github.com/ensime/ensime-emacs/pull/390/files`
2016-04-01 00:26:20 -04:00
Channing Walton 7466fdc678 optionally enable ensime
a new variable, scala-auto-start-ensime, determines if ensime starts
when a scala file is loaded.

make scala-auto-start-ensime default to t

The current behaviour is to autostart so this will preserve it.

Adding documentation for scala-auto-start-ensime

removed a space

make scala-auto-start-ensime default to t

The current behaviour is to autostart so this will preserve it.

Adding documentation for scala-auto-start-ensime

removed a space
2016-04-01 00:26:19 -04:00
syl20bnr 82fdd9a511 Use evil in holy-mode
Motivation

While disabling Evil in holy-mode makes its implementation shorter and
sounds elegant on the paper, in practice it puts a big burden on the
configuration parts which need to know if Evil is enable or not. This is
a bad separation of concerns and the bunch of fixes that we were forced
to do in the past weeks shows this issue. Those fixes were about
removing the knowledge of the activation of Evil by implementing new
dispatching functions to be used by layers, this is cumbersome and makes
Spacemacs layer configuration more subtle which is not good. There was
additional bad consequences of the removal of Evil state like the
impossibility to use Evil lisp state or iedit states, or we would have
been forced to implement a temporary activation of Evil which is
awkward.

Instead I reintroduce Evil as the central piece of Spacemacs design thus
Evil is now re-enabled in holy-mode. It provides the abstraction we need
to isolate editing styles and be able to grow the Spacemacs
configuration coverage sanely. Layers don't need to check whether the
holy mode is active or not and they don't need to know if Evil is
available (it is always available). We also don't need to write
additional dispatching functions, this is the job of Evil, and I think
it provides everything for this. Ideally configuration layer should be
implemented with only Evil in mind and the holy-mode (and hybrid-mode)
should magically make it work for Emacs style users, for instance we can
freely use `evil-insert-state` anywhere in the code without any guard.

Evil is now even more part of Spacemacs, we can really say that
Spacemacs is Emacs+Evil which is now an indivisible pair. Spacemacs
needed this stable API to continue on the right track.

While these changes should be rather transparent to the user, I'm sorry
for this experimental period, I failed to see all the implications of
such a change, I was just excited about the possibility to make Evil
optional. The reality is that Spacemacs has to embrace it and keep its
strong position on being Emacs+Evil at the core.

Implementation

- insert, motion and normal states are forced to emacs state using an
advice on `evil-insert-state`, `evil-motion-state` and
`evil-normal-state` respectively. These functions can be used freely in
the layer configuration.
- A new general hook `spacemacs-editing-style-hook` allow to hook any
code that need to be configured based on the editing style. Functions
hooked to this hook takes the current style as parameter, this
basically generalize the hook used to setup hjkl navigation bindings.
- ESC has been removed from the emacs state map.
- Revert unneeded changes
  - Revert "evil: enter insert-state only from normal-state"
    commit bdd702dfbe.
  - Revert "avoid being evil in deft with emacs editing style"
    commit f3a16f49ed.

Additional changes

All editing style packages have been moved to a layer called
`spacemacs-editing-styles`

Notes

I did not have time to attack hybrid mode, I should be able to do it
later.
2016-03-13 21:16:55 -04:00
Eivind Fonn 5360fb31f8 Fix broken ensime refactor bindings 2016-03-04 16:06:22 -05:00
Eugene Apollonsky e5e069bbf0 Rename: ensime-refactor-inline-local -> ensime-refactor-diff-inline-local 2016-03-01 18:46:54 +01:00
Alejandro Catalina bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Jerry Peng 14e090af19 scala: support replacing ascii arrows with unicode ones
Add a configuration option `scala-use-unicode-arrows` to
the scala layer, which when enabled replaces `->`, `=>`
and `<-` with corresponding unicode characters (Scala
supports unicode arrows natively).
2016-02-01 00:14:59 -05:00
Eivind Fonn e29ac21345 Register all REPLs and make SPC m ' bindings 2016-01-31 23:39:25 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
Sebastian Wiesner f707993d2e scala: Fix typo in variable name
Sorry :(
2016-01-05 00:44:10 -05:00
Sebastian Wiesner c8e1ee0026 scala: Automatically insert asterisk in multiline comments 2016-01-03 22:23:11 -05:00