Update & reformat module readmes for v2.0.9
+ completion/ivy + completion/company + feature/evil + feature/eval + feature/snippets + feature/workspaces + tools/neotree
This commit is contained in:
parent
eef6ed3d11
commit
e87b788078
7 changed files with 138 additions and 81 deletions
|
@ -1,43 +1,52 @@
|
|||
#+TITLE: :feature eval
|
||||
|
||||
This modules adds support for evaluating code from inside Emacs. This includes REPLs and direct access to the interpreters and compilers of many languages.
|
||||
This modules adds support for evaluating code from inside Emacs, including
|
||||
REPLs.
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#install][Install]]
|
||||
- [[#usage][Usage]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#repls][REPLs]]
|
||||
- [[#code-evaluation][Code Evaluation]]
|
||||
- [[#code-evaluation][*Code Evaluation*]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#repls-1][REPLs]]
|
||||
- [[#code-evaluation-1][Code Evaluation]]
|
||||
|
||||
* Install
|
||||
This module has no external dependencies. However, specific languages may require additional setup.
|
||||
This module has no external dependencies. However, specific languages may
|
||||
require additional setup.
|
||||
|
||||
Check the README.org in that language's module for details.
|
||||
|
||||
* Usage
|
||||
+ *REPLs*
|
||||
Invoked via:
|
||||
+ ~:repl~ (evil ex-command)
|
||||
+ =<leader> o r= in normal mode (or visual mode, which sends the selection to the open REPL)
|
||||
+ ~M-x +eval/open-repl~
|
||||
+ ~M-x +eval/send-region-to-repl~ while a selection (and REPL) is active
|
||||
** REPLs
|
||||
Invoked via:
|
||||
+ ~:repl~ (evil ex-command)
|
||||
+ =<leader> o r= in normal mode (or visual mode, which sends the selection to
|
||||
the open REPL)
|
||||
+ ~M-x +eval/open-repl~
|
||||
+ ~M-x +eval/send-region-to-repl~ while a selection (and REPL) is active
|
||||
|
||||
+ *Code Evaluation*
|
||||
Quickrun can be invoked via:
|
||||
+ ~M-x +eval/buffer~ (or ~gR~, or ~M-r~)
|
||||
+ ~M-x +eval/region~
|
||||
+ ~M-x +eval/region-and-replace~
|
||||
+ Evil users can use the ~gr~ operator to select and run a region.
|
||||
** *Code Evaluation*
|
||||
Quickrun can be invoked via:
|
||||
+ ~M-x +eval/buffer~ (or ~gR~, or ~M-r~)
|
||||
+ ~M-x +eval/region~
|
||||
+ ~M-x +eval/region-and-replace~
|
||||
+ Evil users can use the ~gr~ operator to select and run a region.
|
||||
|
||||
* Configuration
|
||||
** REPLs
|
||||
REPLs are defined for most of the languages Doom supports (check its README.org to see if it does).
|
||||
REPLs are defined for most of the languages Doom supports (check its README.org
|
||||
to see if it does).
|
||||
|
||||
Otherwise, you can define your own for a specified major-mode with the =:repl= setting.
|
||||
Otherwise, you can define your own for a specified major-mode with the =:repl=
|
||||
setting.
|
||||
|
||||
~(set! :repl MAJOR-MODE FUNCTION)~
|
||||
|
||||
FUNCTION must return the repl buffer. Any window changes are ignored, then handed off to shackle (assuming shackle-mode is on) to display in a popup window.
|
||||
FUNCTION must return the repl buffer. Any window changes are ignored, then
|
||||
handed off to shackle (assuming shackle-mode is on) to display in a popup
|
||||
window.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun +emacs-lisp/repl ()
|
||||
|
@ -53,9 +62,14 @@ FUNCTION must return the repl buffer. Any window changes are ignored, then hande
|
|||
#+END_SRC
|
||||
|
||||
** Code Evaluation
|
||||
Run regions or entire buffers with [[https://github.com/syohex/emacs-quickrun][Quickrun]]. Output will be sent to a popup window.
|
||||
Run regions or entire buffers with [[https://github.com/syohex/emacs-quickrun][Quickrun]]. Output is show in a popup window.
|
||||
|
||||
Quickrun includes support for many languages, but occasionally, you'll find a language without support, such as [[https://crystal-lang.org/][Crystal]]. A "runner" can be defined like so:
|
||||
Quickrun includes support for many languages, usually by sending text directly
|
||||
to interpreters or compilers. However, occasionally, you'll find a language
|
||||
without support (like [[https://crystal-lang.org/][Crystal]]), or a language with better Emacs integration
|
||||
(like elisp).
|
||||
|
||||
Here's how you define a "runner":
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(set! :eval 'crystal-mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue