Skip to content

Commit 64347d4

Browse files
committed
Add Elixir client
1 parent 90e7dbd commit 64347d4

File tree

6 files changed

+612
-3
lines changed

6 files changed

+612
-3
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
*conjure-client-elixir-stdio*
2+
3+
==============================================================================
4+
CONTENTS *conjure-client-elixir-stdio-contents*
5+
6+
1. Introduction ........... |conjure-client-elixir-stdio-introduction|
7+
2. Mappings ................... |conjure-client-elixir-stdio-mappings|
8+
3. Configuration ......... |conjure-client-elixir-stdio-configuration|
9+
10+
==============================================================================
11+
INTRODUCTION *conjure-client-elixir-stdio-introduction*
12+
>
13+
iex is an interactive tool (Elixir REPL) used to execute Elixir expressions.
14+
15+
Conjure starts an Elixir REPL within Neovim when you first open an Elixir
16+
(`.ex`) file. You can configure how the Elixir REPL is launched with the
17+
`g:conjure#client#elixir#stdio#command` configuration option.
18+
19+
You should be able to evaluate files and forms as you would with other Conjure
20+
supported languages right away.
21+
22+
Check out `:ConjureSchool` if you're unsure about what evaluation operations
23+
you can perform.
24+
25+
* https://elixir-lang.org/
26+
* https://hexdocs.pm/elixir/introduction.html
27+
28+
==============================================================================
29+
MAPPINGS *conjure-client-elixir-stdio-mappings*
30+
31+
These mappings are the defaults, you can change them as described in
32+
|conjure-mappings| and |conjure-configuration|.
33+
34+
See |conjure-client-elixir-stdio-configuration| for specific configuration
35+
options relevant to these mappings.
36+
37+
<localleader>cs Start the Ruby REPL if it's not running already.
38+
39+
<localleader>cS Stop any existing Ruby REPL.
40+
41+
<localleader>ei Interrupt running command. Same as pressing Ctrl-C
42+
in a cmdline REPL.
43+
44+
==============================================================================
45+
CONFIGURATION *conjure-client-elixir-stdio-configuration*
46+
47+
All configuration can be set as described in |conjure-configuration|.
48+
49+
These items are specific to the Elixir client.
50+
51+
*g:conjure#client#elixir#stdio#mapping#start*
52+
`g:conjure#client#elixir#stdio#mapping#start`
53+
Start the Elixir REPL if it's not running already.
54+
Default: `"cs"`
55+
56+
*g:conjure#client#elixir#stdio#mapping#stop*
57+
`g:conjure#client#elixir#stdio#mapping#stop`
58+
Stop any existing Elixir REPL.
59+
Default: `"cS"`
60+
61+
`g:conjure#client#elixir#stdio#mapping#interrupt`
62+
Interrupt any existing Elixir REPL.
63+
Default: `"ci"`
64+
65+
*g:conjure#client#elixir#stdio#command*
66+
`g:conjure#client#elixir#stdio#command`
67+
Command used to start the Elixir REPL, you can modify this to add
68+
arguments or change the command entirely.
69+
70+
When using a different REPL you'll probably have to change the
71+
`prompt_pattern` too! Have a look at the default REPL output and
72+
write a Lua pattern that will match that prompt string as best as
73+
you can.
74+
75+
Default: `"iex"`
76+
77+
*g:conjure#client#elixir#stdio#prompt_pattern*
78+
`g:conjure#client#elixir#stdio#prompt_pattern`
79+
Lua pattern to identify a new REPL prompt. This match signals to
80+
Conjure that the previous evaluation is complete and we're ready
81+
to submit more code as well as collect all output prior to the
82+
marker as the result.
83+
Default: `"iex%(%d+%)> "`
84+
85+
86+
vim:tw=78:sw=2:ts=2:ft=help:norl:et:listchars=
87+

doc/conjure.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ configure the ones you care about one at a time you can set:
267267
equivalent `g:conjure#filetype#[filetype]` configuration value.
268268

269269
Default: >
270-
["clojure", "fennel", "janet", "hy", "julia", "racket",
270+
["clojure", "elixir", "fennel", "janet", "hy", "julia", "racket",
271271
"scheme", "lua", "lisp", "python", "rust", "sql"]
272272
<
273273
*g:conjure#filetype#clojure*
@@ -276,6 +276,12 @@ configure the ones you care about one at a time you can set:
276276
Help: |conjure-client-clojure-nrepl|
277277
Default: `"conjure.client.clojure.nrepl"`
278278

279+
*g:conjure#filetype#elixir*
280+
`g:conjure#filetype#elixir`
281+
Client to use for `Elixir` buffers.
282+
Help: |conjure-client-elixir-stdio|
283+
Default: `"conjure.client.elixir.stdio"`
284+
279285
*g:conjure#filetype#fennel*
280286
`g:conjure#filetype#fennel`
281287
Client to use for `fennel` buffers. By default we evaluate fennel
@@ -316,6 +322,12 @@ configure the ones you care about one at a time you can set:
316322
Help: |conjure-client-racket-stdio|
317323
Default: `"conjure.client.racket.stdio"`
318324

325+
*g:conjure#filetype#rust*
326+
`g:conjure#filetype#rust`
327+
Client to use for `Rust` buffers.
328+
Help: |conjure-client-rust-evcxr|
329+
Default: `"conjure.client.rust.evcxr"`
330+
319331
*g:conjure#filetype#sql*
320332
`g:conjure#filetype#sql`
321333
Client to use for `SQL` buffers.
@@ -986,6 +998,7 @@ documentation below or through the `:help conjure-client-*` command. You can
986998
install more clients through 3rd party plugins or simply write your own within
987999
your dotfiles.
9881000

1001+
- |conjure-client-elixir-stdio|
9891002
- |conjure-client-fennel-aniseed|
9901003
- |conjure-client-fennel-stdio|
9911004
- |conjure-client-clojure-nrepl|

0 commit comments

Comments
 (0)