Commit graph

82 commits

Author SHA1 Message Date
syl20bnr 78f098ae46 Revert go-coverage to SPC m g c and move create-tages to SPC m g C
SPC m g C is only used in Clojure whereas SPC m g c is used in various layers.
This is simpler to just move create tags to SPC m g C and move the clojure
bindings to SPC m g c (since it is not used in the clojure layer).
2017-03-30 22:07:16 -04:00
Juraj Martinka c48921ab2d Fix typo in Clojure layer README 2017-03-02 16:12:37 +01: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
Benedek Fazekas 970acddacf Clojure refactor: replace cycle coll with convert to coll
Cycle collection type was recently removed from `clj-refactor` as the
feature was migrated and rewritten in `clojure-mode`. The new feature
lets the user convert a collection into a specific collection type
instead of cycling through them.

To added shortcuts correspond to the shortcuts of this feature in
`clojure-mode` and placed in the refactor submenu.
2017-01-26 12:09:50 +00:00
d12frosted ab878bd7ac
update cider keybindings doc 2017-01-23 13:25:48 +02:00
Ivan Plyusnin 15e86700ec
Fix number of arguments in calling cider-test- funcs 2017-01-23 13:21:38 +02:00
ilia acb2d379c0 Fix cider and cider-repl modes in company configuration 2017-01-07 00:21:45 +03:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
carbohydratesn ca5ea34196 Completed instructions for a quick start with boot
Moved to develop branch, original pull request -

https://github.com/syl20bnr/spacemacs/pull/7003

As an absolute beginner, this took a while to figure out, and eventually required reading through Cider's source files.

Currently, there must be a build.boot file present - an empty one works - if you want to start a repl through cider with boot.

https://github.com/clojure-emacs/cider/issues/1835
2016-10-17 19:46:45 +02:00
drew.okane 197eb982b2 Add Clojure to org-babel-load-languages 2016-10-08 19:30:05 +02:00
syl20bnr a3750146c3 clojure: move SPC m s k to SPC m s C 2016-10-03 00:23:52 -04:00
syl20bnr 5f759f6df0 clojure: add SPC m = key binding
per convention
2016-10-03 00:23:15 -04:00
mahinshaw cf951a5114 Update bindings. Add toggle clojure-enlighten-mode 2016-09-23 22:50:09 +02:00
Tim Jäger 2181decd81
Add clear REPL keybinding for Clojure 2016-09-23 10:48:48 +03: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
Sebastian Poeplau 781532d4d2
Improve README of the Clojure layer
Explicit configuration of leiningen or boot is not necessary anymore as
of CIDER 0.11.
2016-08-27 14:41:57 +03: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
Antonis Kalou 27098315e8 Added support for extra cider commands
Also moved enlighten-mode toggle to toggles
2016-08-22 15:07:25 +02:00
Christian E. Hopps b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +02:00
km d7820aafd6 Remove even more 24.3 related configuration
Helm-flx, which is included as a core package, requires a minimum Emacs
version of 24.4. As it stands attempting to install Spacemacs on Emacs
24.3 or below will break on helm-flx.
2016-06-20 22:26:53 -04:00
Eivind Fonn 0b2a438aa7 clojure: enable smartparens in cider
cider-repl-mode doesn’t derive from comint
2016-06-12 21:50:34 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
sooheon 15e6290151 Make check for company-mode explicit, not implicit
People may have company-mode installed without necessarily using the
auto-completion layer.
2016-05-27 00:32:05 -04:00
Eivind Fonn 46446df83d Make boot file regexp more restrictive 2016-05-06 12:59:05 +02:00
syl20bnr a025dc8f52 clojure: move functions to funcs.el 2016-04-21 19:08:41 -04:00
sooheon e64c337b82 Remove obsolete clojure-defun-style-default-indent
clojure-defun-style-default-indent has been deprecated in favor of
clojure-indent-style. This is no longer a toggle but one of three
keywords. As it affects the way code is indented, and you should not
need to change your indentation style multiple times while editing, it
should not be a toggle. It's simple enough for the user to setq it to
desired value.

If desired, it may be added back as a completing-read selection (but I
don't think it's necessary).
2016-04-21 18:59:52 -04:00
syl20bnr dd8e845f6e clojure: add docstrings to functions 2016-04-21 18:59:28 -04:00
sooheon 39f424bd45 Fix cider tests error, and improve implementation
Error was caused by unnecessarily wrapping cider test fns in
spacemacs//cider-eval-in-repl-no-focus. Test fns do not move focus to
repl anyways, and it caused a wrong-type-argument error.

The added bindings are to more closely match cider bindings (under C-c
C-t). Now spacemacs cider test fns mirror the cider ones.
2016-04-21 18:56:45 -04:00
sooheon 02ee0f2e54 Setup normal state cider-debug for hybrid mode
Hybrid means vim-like in normal and emacs-like in insert. This is a
normal-state compatibility tweak (has no effect on insert-state
bindings), so it belongs.
2016-04-21 18:55:02 -04:00
syl20bnr 07852abad5 Format documenation files with doc-fmt tool 2016-04-12 23:31:38 -04:00
Fabien Dubosson 5f93dc364f [clojure] Fix loading of eldoc-mode 2016-04-11 20:30:47 +02:00
sooheon 4c543ee25c Remove depreciated cider-turn-on-eldoc-mode
Use more general 'eldoc-mode instead. Also enable eldoc-mode in the
repl as well.
2016-04-11 20:17:52 +02:00
Amar Sood (tekacs) 14b650e81e cider-turn-on-eldoc-mode is deprecated.
Use (eldoc-mode) instead.
2016-04-11 20:16:15 +02:00
hujianxin fdf73e9234 Clojure: Fix a error caused by mess writing.
In this case, `mode` should be fixed to `m` .
2016-04-04 19:42:57 -04:00
syl20bnr 63e1db9923 clojure: move command prefix names and remove some duplicated code 2016-04-03 00:27:44 -04:00
syl20bnr 3b0c1fd93d Convert org doc files with doc-fmt 2016-03-30 22:59:55 -04:00
Caleb Jones d983bf7ec7 Improve Leiningen installation instructions in Clojure layer
The previous installation instructions suggested that you install lein
via your OS package manager, but since the minimum required version to
run the plugins is 2.5.2 and some OS package managers are still
packaging versions in 1.x, linking to the official install instructions
is better.

Fixes #5612
2016-03-30 18:52:31 -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
Fabien Dubosson b9cd9c1cd8 Remove rainbow-delimiters-mode from mode-specific hooks
`spacemacs` now handles `rainbow-delimiters-mode` by adding it to the
`prog-mode-hook`, if wanted by the user. Some layers are adding it on
their own mode-hook, having for effect that `rainbow-delimiters-mode` is
called twice, which disable it.

This commit remove these layer-specific definitions of
`rainbow-delimiters` as it is now handled by the `spacemacs`
distribution. It also takes care of running `prog-mode-hook` in modes
that are not derived from it.

Fixes #3902
2016-03-09 20:23:29 -05:00
Malchevskiy Misha d91d907d5d Fix cider-pop-back function name
Alias `cider-jump-back` was deprecated and then removed from CIDER here: 705133f2bd
2016-03-04 16:06:08 -05:00
Alejandro Catalina Feliú d3833db77b clojure: add clojure-snippets to clojure layer
This will add some nice snippets right out of the box.
2016-03-03 20:54:06 +01:00
Patrik Plihal 097887104f add 'cider-apropos functionalty to clojure layer 2016-02-25 20:31:31 +01:00
mahinshaw 8029222b26 Add mapping for switching between repl connections. 2016-02-23 20:51:07 +01:00
Alejandro Catalina bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Alejandro Catalina d68542e7da cider: yet another missed occurrence 2016-02-18 23:30:38 -05:00
Alejandro Catalina 7d2181bd47 fix renamed cider-test-run-tests function
The function was renamed in recent commit to cider-test-run-ns-test, see
568263143b (diff-f8e2b8e5fa0f8c5cda946e72ab461994R572)
for more info.
2016-02-16 23:05:05 -05:00
justbur aab007d225 evil-jumper: Remove obsolete package
The functionality is now incorporated into the evil core and this
package has been marked as obsolete.
2016-02-16 21:23:07 -05:00