Commit graph

164 commits

Author SHA1 Message Date
John Stevenson cc43d5c898 [Clojure] keybinding spacemacs/clj-find-var
Update the existing `SPC m g g` keybinding to use the command
`spacemacs/clj-find-var`.  This makes finding a function definition a much
better experience as you dont have to have the REPL running to find a
definition, but when it is you can use a CIDER specific function.

`spacemacs/clj-find-var` is a wrapper that calls `cider-find-var` if the REPL is
running, otherwise it uses `dump-jump-go`.

Wrapper added in #9792
2019-07-13 15:12:55 +02:00
John Stevenson 8fd218f1e8 [Clojure] keybinding for updated repl jack-in commands
Latest CIDER release uses the following commands for starting the REPL from
within Emacs

`cider-jack-in-clj` to start a Clojure REPL
`cider-jack-in-clj&cljs` to start a Clojure and ClojureScript REPL
`cider-jack-in-cljs` to start a ClojureScript repl

The older aliases are deprecated and are being removed in the latest beta
release of CIDER

`cider-jack-in`
`cider-jack-in-clojurescript`

Keybindings for these jack-in commands have been updated and as there are three
options they have been moved under the repl > jack-in

The top level of the Clojure mode menu has the existing keybindings updated to
use the new commands.  A third top-level keybinding `&` has been added for
`cider-jack-in-clj&cljs`
2019-07-13 14:41:06 +02:00
duianto e12278a323 Revert "[Clojure] Keybinding require Clojure repl utils in current namespace"
This reverts commit 034ee0c311.

It was rebased with the previous commits message.
2019-07-13 14:40:44 +02:00
John Stevenson 034ee0c311 [Clojure] Keybinding require Clojure repl utils in current namespace
Although the Clojure repl utils (clojure.repl) are including in the user
namespace in Clojure projects, they are not available in your application
namespace.

The existing CIDER function cider-repl-require-repl-utils adds the Clojure
repl utils into the current namespace, so you can use functions such as doc
and source.

This is often a source of confusion for those new to Clojure / CIDER.
2019-07-13 12:50:11 +02:00
John Stevenson cd95789170 [Clojure] Keybinding require Clojure repl utils in current namespace
Although the Clojure repl utils (clojure.repl) are including in the user
namespace in Clojure projects, they are not available in your application
namespace.

The existing CIDER function cider-repl-require-repl-utils adds the Clojure
repl utils into the current namespace, so you can use functions such as doc
and source.

This is often a source of confusion for those new to Clojure / CIDER.
2019-07-13 11:52:32 +02:00
JAremko 6c12121cec fix links 2019-07-08 23:56:07 +03:00
Jonathan Chen 28adf374fe feat(clojure-lang): add cider-eval-sexp-at-point
Adds a useful CIDER command that doesn't have an idiomatic Spacemacs command.

Ref:
https://cider.readthedocs.io/en/latest/interactive_programming/#using-cider-mode
2019-07-06 00:17:03 +02:00
John Stevenson bb34374818 Add keybinding for cider-interupt
Interrupt longer running evaluations without having to kill or reset the REPL
connection.

Placed in the evaluate section, as it is specific to the currently running
evaluation.
2019-06-13 15:27:02 +02:00
duianto 47f83609d5 [clojure][doc] markdown inline code to org verbatim
Change surrounding characters: markdown inline code to org verbatim.
2019-06-13 01:27:48 +02:00
Liu Chong bd61f2e8a0 Remove cider.nrepl/cider-middleware in lein quick start setting
Don't need this `cider.nrepl/cider-middleware` in lein profiles.clj.

It will result in error, the `cider.nrepl/cider-middleware` not middleware but a vector of all cider-nrepl middlewares:

> https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl.clj#L483
2019-06-12 19:31:16 +02:00
emacspace c7c348a676 documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00
JAremko 5cc823cc0f add flycheck-clojure 2019-05-18 02:17:43 +03:00
Anton-Latukha f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
Anton-Latukha 2ee74f55da layers: lang: new structure: add DSL (&markup), framework, util
layers: lang: mv framework -> programming/framework

layers: programming: framework: upd
2019-05-15 21:05:09 +03:00
JAremko 77c680160e Add placeholder tags 2019-05-05 20:40:47 +03:00
John Stevenson 831107f478 [clojure] keybinding - cider-undef - remove symbol from current ns
Adds `SPC m e u` to the Clojure layer to call `cider-undef`, removing an
existing definition from the current namespace.

This provides a Spacemacs style keybinding for the existing Emacs style
keybinding `C-c C-u`
2019-04-20 15:26:55 +02:00
Martin Račák f85acca55d Fix post-init of parinfer in the clojure layer
Reverted clojure/post-init-parinfer back to a state before the refactor, which
introduced spacemacs|forall-clojure-modes. That macro deals with modes, not
hooks, therefore we can't use it for add-hook.
2019-04-08 18:17:22 +02:00
Ag Ibragimov 1dadfcd0e1 [clojure] Improves spacemacs-jump-handlers
jump handlers in clojure modes now correctly work
for: `, g g` `, g G` `gd` and `gD`
2019-04-07 18:22:51 +02:00
emacspace 18a998b675 documentation formatting: Thu Apr 4 16:29:54 UTC 2019 2019-04-04 23:19:59 +02:00
Timo Freiberg 4351063f6a [clojure] change run-all-tests alias to run-project-tests
The previous docstring said that there's a bug with cider-test-run-project-tests
but it seems to work fine now
2019-04-04 16:43:59 +02:00
Timo Freiberg 978df8a70e [clojure] call cider-test-* functions interactively 2019-04-04 16:18:46 +02:00
John Stevenson 074588475b Clojure Layer - Updated docs for Cider manual quick start
Updated documentation for Clojure layer to currently recommended versions of
build tools and `cider-nrepl`, ensuring that connecting to a manually run
Clojure REPL works correctly with the current version of CIDER.

Leiningen version 2.9.0
Boot version 2.8.2
`cider-nrepl` 0.21.1
2019-04-03 18:31:17 +02:00
JAremko 9509cf6bcf Clojure cheatsheet is now a part of CIDER 2019-01-20 16:59:48 +02:00
emacspace 45276bd96f documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05:00
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
emacspace db0dd6d945 documentation formatting: Fri Nov 16 19:57:10 UTC 2018 2018-11-16 20:21:32 +00:00
yuhan0 f13f99d967 Enable clojure-mode refactorings without clj-refactor
- Add clojure-mode refactorings and which-key prefixes in default layer
configuration.

- Improve discoverability of the refactoring features which are not enabled
by default. When clj-refactor is installed, "SPC mr?" runs
cljr-describe-refactoring

- Refactor out repeated dolist clauses into `forall-clojure-modes` macro
which executes body forms for all clojure derived modes, and adds missing
functionality of parinfer, fancify-symbols and evil-cleverparens to
cider-repl-mode and cider-clojure-interaction-mode.
2018-11-16 19:51:21 +00:00
emacspace 901f35849a documentation fixes: Tue Oct 23 14:18:21 UTC 2018 2018-10-23 23:38:16 +03:00
Dieter Komendera 8f30ba8390
Allow to send input to the repl via RET in normal mode 2018-10-23 07:27:31 +03:00
JAremko 12b4fdb1fe fix sayid url 2018-10-13 23:56:28 +03:00
JAremko cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03:00
Arne Brasseur 80baa130cf Make clj-refactor off by default, update Clojure README
Document how to use the newly introduced variables to enable sayid and
clj-refactor.

Also update the documentation on adding CIDER-related dependencies. CIDER 0.10
is three years old now, so I think the case where cider middleware isn't
injected automatically is getting rare. However there is still a good use case
for running your Clojure process outside of Emacs/CIDER, meaning you don't get
to benefit from `cider-jack-in`'s magic insjections, so I have focused more on
that case, adding information for clj-refactor's and sayid's middleware, as well
as CIDER's.
2018-10-09 22:18:51 +01:00
Arne Brasseur 77cf6a2a36 Clojure layer: make sayid optional 2018-08-21 22:42:17 +03:00
Miciah 0deadbebcf clojure: Delete bogus escaping in font-lock regexps
* layers/+lang/clojure/funcs.el (clojure/fancify-symbols): Delete bogus
backslashes.
2018-08-01 17:31:32 -04:00
Miciah 91267a2af7 clojure: Fix face name of fancified symbols
Fix issue #9271: Setting clojure-enable-fancify-symbols to t causes
the following to the be printed repeatedly in the message buffer:

    invalid face reference: t

The problem is that the clojure/fancify-symbols function adds font-lock
keywords with highlight forms containing face-name expressions that
evaluate to the return value of compose-region, which apparently is t;
this value is interpreted as a face name.

The solution to this problem is that the face-name expressions should
evaluate to nil, which will be interpreted as an empty list of properties
instead of a face name.

* layers/+lang/clojure/funcs.el (clojure/fancify-symbols): Define keywords
using face-name expressions that evaluate to nil.
2018-08-01 17:31:32 -04:00
André Peric Tavares 52b2b4b83d Update obsolete cider-refresh alias to cider-ns-refresh
`cider-refresh` is an obsolete alias:

8b8309d970/cider-ns.el (L204)
2018-07-24 00:21:29 +03:00
JAremko 6946e255e6 Reformat docs 2018-07-20 02:45:21 +03:00
Andre Ramos f3cbf89b45 Clojure layer: fix regression for pinned cider 2018-07-12 16:26:39 +01:00
Alex Argunov c1bde286e4 clojure: move browse to help submenu, add cider-find-ns under gn 2018-07-11 00:26:33 +03:00
Andre Ramos 9cb0b07dff Clojure layer: fix function usage in clojure layer according to cider changes
The function `cider-current-repl-buffer` does not exist anymore in cider after PR [#2324](https://github.com/clojure-emacs/cider/pull/2324) was merged.
It broke the usage of functions in the clojure layer that sent used `spacemacs//cider-eval-in-repl-no-focus`, which sends forms to be evaluated in the repl buffer without focusing on it.
The fix is to use `cider-current-repl` instead of `cider-current-repl-buffer`
2018-07-04 00:16:58 +03:00
Miciah Masters e0b751bee3 Avoid non-idempotent use of push in init code
Replace push with add-to-list in layer init functions and related code.

Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.

Replace a conditional push onto erc-packages with use of :toggle.

When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements.  We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.

Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
2018-06-05 22:17:13 -04:00
Codruț Constantin Gușoi 18c7241e2d Removes unwanted whitespaces 2018-05-23 23:27:20 +03:00
Wojciech Wojtyniak df4c3b96f1 Enable command history navigation in the cider REPL in an insert mode
This is the same navigation that is used in normal mode. This behavior matches
one from the elisp REPL.
2018-05-23 23:26:32 +03: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
JAremko 7ce071b4be Format documentation 2018-02-28 03:29:48 +02:00
syl20bnr fd90547908 clojure: fix key bindings location in README.org 2018-02-25 12:44:25 -05:00
syl20bnr a40b79a781 clojure: sort key bindings alphabetically 2018-02-24 19:49:39 -05:00
Luo Tianj 280c7b4cef add key bindings for profiling and spec browsing 2018-02-24 19:49:38 -05:00
nijohando d4ae5a3c2b fix: Rename deprecated cider function
"cider-jump-to-resource" has been renamed "cider-find-resource" in
CIDER 0.9.0
2018-02-17 16:09:06 -05:00