summaryrefslogtreecommitdiff
path: root/cider-mode.el
Commit message (Collapse)AuthorAge
* Bump the copyright yearsBozhidar Batsov2019-01-01
|
* Use symbols for repl types instead of strings and efficient comparisonsDieter Komendera2018-11-18
| | | | Make public functions backwards compatible by converting type string to symbol
* Fix face names in docstring of cider-font-lock-dynamically variabletijsmallaerts2018-10-31
|
* Update a menuBozhidar Batsov2018-09-15
|
* Replace usages of eval-after-load with with-eval-after-loadBozhidar Batsov2018-09-15
| | | | | | | | | | | | `with-eval-after-load` was introduced in Emacs 24.4 and its usage results in a cleaner code. `eval-after-load` is considered ill-behaved because it is a function, not a macro, and thus requires the code inside it to be quoted, which means that it cannot be byte-compiled. It also accepts only one form, so if you have more than one, you need to use `progn`. More details - https://stackoverflow.com/questions/21880139/what-is-with-eval-after-load-in-emacs-lisp
* Restore the C-c C-p and C-c C-f keybindingsBozhidar Batsov2018-08-08
| | | | | | | Seems more people were relying on those than I originally expected. :-) Vox populi, vox dei!
* Mention cider-load-buffer-and-switch-to-repl-buffer in cider-mode'sBozhidar Batsov2018-08-06
| | | | menu
* Rename `cider-describe-current-connection` -> `cider-describe-connection`Vitalie Spinu2018-08-05
| | | | .. because it accepts an explicit REPL argument now.
* Add cider-ns-reload and cider-ns-reload-all commandsAndrea Richiardi2018-08-02
| | | | | The C-c M-n l has been assigned to cider-ns-reload while C-c M-n M-l has been assigned to cider-ns-reload-all.
* Add mouse bindings and document themTobias Gerdin2018-07-31
|
* Force ns caching for ns lookup related to dynamic indentationBozhidar Batsov2018-07-26
| | | | | | | | | | | | That's another take at https://github.com/clojure-emacs/clojure-mode/issues/478. The original solution enabled ns caching globally in `clojure-mode`, but this created problems for people who'd change a namespace without noticing they have to invalidate the cached value. As that's the only real hotspot for `clojure-find-ns` (used internally in `cider-current-ns`) we can simply let-bind the caching in this scope and leave evaluations out of this.
* Move the pprint related commands to a dedicated keymapBozhidar Batsov2018-07-23
| | | | | | This also fixes https://github.com/bbatsov/projectile/issues/1256. (Projectile uses `C-c C-p` as well)
* Add `cider-ns-map` and bind to `C-c M-n`Vitalie Spinu2018-07-13
|
* Bind C-c M-r to cider-restartVitalie Spinu2018-07-13
|
* Use cider-jack-in-cljs consistently in the code and documentationBozhidar Batsov2018-07-11
|
* Fix a broken file referenceBozhidar Batsov2018-07-10
| | | | I didn't noticed this when reviewing my previous changes.
* Rename the cider-refresh.el to cider-ns.elBozhidar Batsov2018-07-10
| | | | | | See https://github.com/clojure-emacs/cider/pull/2314 for the rationale behind this change. Basically we plan to put several ns manipulation commands together in the same module.
* Refactor `cider-switch-to-repl-buffer` and `cider-repl-switch-to-other`Vitalie Spinu2018-06-30
| | | | | | | | - cider-switch-to-repl-buffer uses cider-current-repl instead of implementing its own lookup - cider-repl-switch-to-other throws a "no other REPL" error if no other REPL exists instead of switching to an arbitrary buffer
* Move the cider-find-var functionality to cider-find.elBozhidar Batsov2018-06-26
|
* [Fix #2203] Rename cider-interaction.el to cider-eval.elBozhidar Batsov2018-06-25
| | | | | | | | | | All of the non-eval functionality was removed, which marks the end of the process of breaking up the old file. Down the road we may opt to break down cider-eval into some core functionality and extra functionality, as many of the eval commands there are kind of "exotic", but that's not that important at this point.
* Fix the buildBozhidar Batsov2018-06-25
| | | | | | | | I can't think of a simple way to deal with menus coming from other files that are added to cider-mode's menu. Those are the only reason why we require cider-test, cider-doc and cider-profile.
* Add a small comment on auto-loadingBozhidar Batsov2018-06-25
|
* Don't require cider-profile in cider-modeBozhidar Batsov2018-06-25
| | | | | It's better to just load cider-profile.el on demand, relying on the fact that all interactive commands there are auto-loaded.
* [#2203] Extract the find functionality in its own source fileBozhidar Batsov2018-06-24
| | | | | | | | This also allows to simply auto-load the find commands when they are used for the first time. cider-jump-to is moved to cider-common.el, as it has other uses, apart from the ones in the various find commands.
* [#2203] Move cider-undef and cider-run to cider-mode.elBozhidar Batsov2018-06-24
|
* [#2203] Extract the code completion functionality in its own source fileBozhidar Batsov2018-06-23
|
* [#2203] Extract the refresh functionality in its own source fileBozhidar Batsov2018-06-23
| | | | | This also allows to simply auto-load the cider-refresh command when it is used for the first time.
* [#2203] Extract the tracing functionality in its own source fileBozhidar Batsov2018-06-22
| | | | | This also allows to simply auto-load the tracing commands when they are used for the first time.
* [#2203] Move the insert and eval functionality out ofBozhidar Batsov2018-06-22
| | | | | | cider-interaction.el It's pretty self-contained and it's used only in cider-mode.el.
* Rename `cider-eval-defun-to-point` and `cider-eval-sexp-to-point`Bozhidar Batsov2018-06-22
| | | | | The new names are the a bit more descriptive `cider-eval-defun-up-to-point` and `cider-eval-sexp-up-to-point`.
* Reorder a bit the eval menuBozhidar Batsov2018-06-22
| | | | A small attempt to group related functionality better together.
* [Fix #2328] Add new interactive command cider-eval-sexp-to-point (#2339)Chris Zheng2018-06-22
| | | It's similar in nature to cider-eval-defun-to-point, but operates on the current sexp.
* Introduce a new command named `cider` (`C-c M-x`)Bozhidar Batsov2018-06-19
| | | | | | | | The command acts as a simple wrapper around all commands for starting/connecting to REPLs. It spares you having to remember a ton of keybindings and pays special homage to the one true `M-x`.
* Revert "Remove cider-compat.el"Bozhidar Batsov2018-06-18
| | | | | | | This reverts commit b28fbac964907172fdedc3bea56eab905d5fbdbf. This can't be fully removed due to the difference in the signature of `if-let*` and `when-let*` in Emacs 25 and 26.
* Remove cider-compat.elBozhidar Batsov2018-06-18
| | | | It's no longer needed now that we target Emacs 25.
* Check for missing repls in cider-switch-to-repl-bufferVitalie Spinu2018-06-18
| | | | Situation that should occur with broken links during development only.
* Remove lingering condition-case-unless-debugVitalie Spinu2018-06-18
|
* New connection API and jack-in rewrite (#2324)Vitalie Spinu2018-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Second attempt on #2069. A brief description of the new functionality follows. 1) __Jack-in/connect__ - User level commands: Create new sessions: C-c M-j: cider-jack-in-clj C-c M-J: cider-jack-in-cljs C-c M-c: cider-connect-clj C-c M-C: cider-connect-cljs Add new REPLs to the current session: C-c M-s: cider-connect-sibling-clj C-c M-S: cider-connect-sibling-cljs - `cider-jack-in-clojurescript` no longer creates two repls, only the cljs repl - clj repl has no longer a special status of the "main" repl. All repls within a session share same server and are siblings of each other. You can create as many clj and cljs siblings as you want from any repl. - Creation of the client is no longer tightly bounded with the nrepl-server startup. The dynamic communication mechanism between jack-in and nrepl-server filter has been replace by a simple `on-port-callback`. 2) __New Connection and Session Management API__ - Connections (aka REPLs) are grouped in [sesman](https://github.com/vspinu/sesman) sessions. Sibling repls are added to the current session. - Cider connection commands (`cider-quit`, `cider-restart`, `cider-display-connection-info`) have been refactored to operate exclusively on the connection level. - Sesman commands operate on the whole session: ![sesman-map](https://user-images.githubusercontent.com/1363467/41355277-6864ffb8-6f21-11e8-9387-3de586477d68.png) - Associations (links) between current context (buffer, directory, project) are governed by sesman and could be formed only on the session level. In a nutshell, session can be linked to projects, directories and buffers. Buffer link have precedence over directory links, and directory have precedence over project links. When a sesman session is registered it's automatically linked with the lowest priority context (project, or directory if no project found). By default (configured with `sesman-1-to-1-links`) multiple sessions can be linked with a project or a directory, but only one session can be linked with a buffer. Cider functionality (eval, completion, repl-switching etc) operate on linked sessions. When there are multiple linked sessions ambiguity is automatically resolved by the recency of the REPL buffers (configured with `sesman-disambiguate-by-relevance`). - Show info on current links with `C-c C-s l`. Show info on current, linked or all sessions with `C-c C-s i`. - Micro-management of the server is not allowed (it's not useful and would complicate UI). All repls within a session share a server. Server can be either remote (`cider-connect`) or local (bootstraped within the emacs during `cider-jack-in-xyz`). In case of the local server, when the last connection is killed the server is automatically killed. `cider-restart` restarts the connection but not the server. `sesman-restart` restarts the server and all the connections. At least two issues I still plan to tackle here: - Restart of SSH tunneled connection has not been tested and probably doesn't work - REPL buffer naming system is no longer adequate. It should be possible to include session name as part of the buffer name and add more flexibility into the customization of buffer name templates. ----- A tot of no longer necessary or questionable functionality has been removed. The goal is to start from scratch and add only what is really necessary. I am listing all the removed functions for the ease of lookup through the github interface. Removed: cider--connection-host, cider--connection-port, cider--connection-project-dir, cider--connection-properties, cider--connection-type, cider--guess-cljs-connection, cider--has-warned-about-bad-repl-type, cider--in-connection-buffer-p, cider--quit-connection, cider--restart-connection, cider-assoc-buffer-with-connection, cider-assoc-project-with-connection, cider-change-buffers-designation, cider-clear-buffer-local-connection, cider-close-nrepl-session, cider-connections (variable), cider-current-connection (variable), cider-current-messages-buffer, cider-current-repl-buffer, cider-default-connection, cider-extract-designation-from-current-repl-buffer, cider-find-connection-buffer-for-project-directory, cider-find-reusable-repl-buffer, cider-make-connection-default, cider-map-connections, cider-other-connection, cider-project-connections, cider-project-connections-types, cider-prompt-for-project-on-connect, cider-read-connection, cider-repl-buffers, cider-replicate-connection, cider-request-dispatch, cider-rotate-default-connection, cider-toggle-buffer-connection, cider-toggle-request-dispatch, nrepl-connection-buffer-name-template, nrepl-create-client-buffer-function, nrepl-post-client-callback nrepl-prompt-to-kill-server-buffer-on-quit, nrepl-use-this-as-repl-buffer, Connection Browser Functionality: cider--connection-browser-buffer-name, cider--connection-ewoc, cider--connection-pp, cider--connections-close-connection, cider--connections-goto-connection, cider--connections-make-default, cider--connections-refresh, cider--connections-refresh-buffer, cider--ewoc-apply-at-point, cider--setup-connection-browser, cider--update-connections-display, cider-client-name-repl-type, cider-connection-browser, cider-connections-buffer-mode, cider-connections-buffer-mode-map cider-connections-close-connection, cider-connections-goto-connection, cider-connections-make-default, cider-display-connected-message, cider-project-name, Renamed: cider-current-session -> cider-nrepl-eval-session cider-current-tooling-session -> cider-nrepl-tooling-session cider-display-connection-info -> cider-describe-current-connection cider-create-sibling-cljs-repl -> cider-connect-sibling-cljs nrepl-connection-buffer-name -> nrepl-repl-buffer-name cider--close-connection-buffer -> cider--close-connection ## repl <> connection overlap cleanup cider-connections -> cider-repls cider-current-connection -> cider-current-repl cider-map-connections -> cider-map-repls cider-connection-type-for-buffer -> cider-repl-type-for-buffer cider-repl-set-type -> cider-set-repl-type
* Group insert-into-repl commands in a common keymap and make them more ↵dpsutton2018-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | flexible (#2319) I noticed the insert-into-repl commands didn't have an easy map to use those commands so I added them under a map. Allows some defcustoms to tweak the behavior: - `cider-invert-insert-eval-p`: Previously, the prefix arg was required to have the inserted form evaluated and the default behavior was to just plop the form in the repl. This inverts that so that by default the forms are inserted and then evaluated. The benefit is that now the repl has a sequence of values and the forms that give those values context. - `cider-switch-to-repl-after-insert-p`: Previously when using an insert command point was moved into the repl buffer unconditionally. Now it is conditional. This is desirable since now that it is easy to have inserted forms evaluated by default the repl often doesn't need focus after each insertion. The motivation behind these changes is when working with `comment` forms. Imagine some comment forms that are useful for inspecting your namespace. This makes it easy to eval a sequence of them and put their forms and results in the repl so there is a sense of context. It is also easy to put a prefix arg on them to prevent evaluation and then modify them if you need. This does some work towards @halgari 's issue in https://github.com/clojure-emacs/cider/issues/2255 in putting a similar behavior to Cursive into CIDER. Notice how the evaluations from the comment form are plopped into the repl to give a sense of context to the state of the repl. That workflow now will work with the caveat that you have to be at the end of the form rather than any point inside of it (but that is next on the roadmap). This felt like a way to get 70% of the functionality there quickly. To emulate the behavior of that gif, do ```elisp (setq cider-invert-insert-eval-p t) ;; eval after inserting by default (setq cider-switch-to-repl-after-insert-p nil) ;; don't switch to the repl buffer ``` Then the insert map is now at `C-c C-j`. There you will find - `e`: insert last sexp - `d` insert top level defun (not modified yet to work with `comment` forms intelligently yet - `r` insert region - `n` insert ns form
* [Fix #2310] Add cider-format-edn-last-sexp (#2311)Chris Zheng2018-06-08
|
* Fix indentationBozhidar Batsov2018-04-26
|
* Mention cider-connect-clojurescript in the menuBozhidar Batsov2018-04-26
|
* Update a few menu entriesBozhidar Batsov2018-04-25
|
* Add a couple of "insert-in-repl" commands to cider-mode's menuBozhidar Batsov2018-03-30
| | | | | Otherwise people are going to have a very hard time finding out about them. Likely we should also put all of those under a unified keymap.
* Make the cider-replicate-connection command more visibleBozhidar Batsov2018-03-22
|
* Update a docstringBozhidar Batsov2018-03-18
|
* [#2199] Checkdoc fixesNeil Okamoto2018-03-05
|
* Declare functions to resolve warningsgganley2018-03-03
|
* [#2202] Decouple the ClojureScript REPL selection from the build tool being usedBozhidar Batsov2018-03-01
| | | | | | Now the user will simply be prompted for the REPL they want to start. Later we should make this smarter - compute a good default based on the project deps, don't show unsupported options, etc.
* Add `cider-profile-menu`Tianxiang Xiong2018-02-11
| | | | The submenu can be found under the CIDER Interactions menu.