Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The core features of Conjure are language agnostic (although it's targeted at Li
* JavaScript (using https://nodejs.org/[Node.js]) over stdio
* https://ccrma.stanford.edu/software/snd/[Snd] / https://ccrma.stanford.edu/software/snd/snd/s7.html[s7] (sound editor scriptable with Scheme) over stdio
* https://en.wikipedia.org/wiki/SQL[SQL] (PostgreSQL psql by default) over stdio
* https://elixir-lang.org/[Elixir] over stdio

You can learn more about the mappings and configuration inside Neovim with `:help conjure`. Each language client also has it's own specific help text under `:help conjure-client-{LANGUAGE}-{TRANSPORT}`, such as `:help conjure-client-clojure-nrepl`, which contains specific mappings and configuration for that client.

Expand Down
87 changes: 87 additions & 0 deletions doc/conjure-client-elixir-stdio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
*conjure-client-elixir-stdio*

==============================================================================
CONTENTS *conjure-client-elixir-stdio-contents*

1. Introduction ........... |conjure-client-elixir-stdio-introduction|
2. Mappings ................... |conjure-client-elixir-stdio-mappings|
3. Configuration ......... |conjure-client-elixir-stdio-configuration|

==============================================================================
INTRODUCTION *conjure-client-elixir-stdio-introduction*
>
iex is an interactive tool (Elixir REPL) used to execute Elixir expressions.

Conjure starts an Elixir REPL within Neovim when you first open an Elixir
(`.ex`) file. You can configure how the Elixir REPL is launched with the
`g:conjure#client#elixir#stdio#command` configuration option.

You should be able to evaluate files and forms as you would with other Conjure
supported languages right away.

Check out `:ConjureSchool` if you're unsure about what evaluation operations
you can perform.

* https://elixir-lang.org/
* https://hexdocs.pm/elixir/introduction.html

==============================================================================
MAPPINGS *conjure-client-elixir-stdio-mappings*

These mappings are the defaults, you can change them as described in
|conjure-mappings| and |conjure-configuration|.

See |conjure-client-elixir-stdio-configuration| for specific configuration
options relevant to these mappings.

<localleader>cs Start the Ruby REPL if it's not running already.

<localleader>cS Stop any existing Ruby REPL.

<localleader>ei Interrupt running command. Same as pressing Ctrl-C
in a cmdline REPL.

==============================================================================
CONFIGURATION *conjure-client-elixir-stdio-configuration*

All configuration can be set as described in |conjure-configuration|.

These items are specific to the Elixir client.

*g:conjure#client#elixir#stdio#mapping#start*
`g:conjure#client#elixir#stdio#mapping#start`
Start the Elixir REPL if it's not running already.
Default: `"cs"`

*g:conjure#client#elixir#stdio#mapping#stop*
`g:conjure#client#elixir#stdio#mapping#stop`
Stop any existing Elixir REPL.
Default: `"cS"`

`g:conjure#client#elixir#stdio#mapping#interrupt`
Interrupt any existing Elixir REPL.
Default: `"ci"`

*g:conjure#client#elixir#stdio#command*
`g:conjure#client#elixir#stdio#command`
Command used to start the Elixir REPL, you can modify this to add
arguments or change the command entirely.

When using a different REPL you'll probably have to change the
`prompt_pattern` too! Have a look at the default REPL output and
write a Lua pattern that will match that prompt string as best as
you can.

Default: `"iex"`

*g:conjure#client#elixir#stdio#prompt_pattern*
`g:conjure#client#elixir#stdio#prompt_pattern`
Lua pattern to identify a new REPL prompt. This match signals to
Conjure that the previous evaluation is complete and we're ready
to submit more code as well as collect all output prior to the
marker as the result.
Default: `"iex%(%d+%)> "`


vim:tw=78:sw=2:ts=2:ft=help:norl:et:listchars=

15 changes: 14 additions & 1 deletion doc/conjure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ configure the ones you care about one at a time you can set:
equivalent `g:conjure#filetype#[filetype]` configuration value.

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

*g:conjure#filetype#elixir*
`g:conjure#filetype#elixir`
Client to use for `Elixir` buffers.
Help: |conjure-client-elixir-stdio|
Default: `"conjure.client.elixir.stdio"`

*g:conjure#filetype#fennel*
`g:conjure#filetype#fennel`
Client to use for `fennel` buffers. By default we evaluate fennel
Expand Down Expand Up @@ -316,6 +322,12 @@ configure the ones you care about one at a time you can set:
Help: |conjure-client-racket-stdio|
Default: `"conjure.client.racket.stdio"`

*g:conjure#filetype#rust*
`g:conjure#filetype#rust`
Client to use for `Rust` buffers.
Help: |conjure-client-rust-evcxr|
Default: `"conjure.client.rust.evcxr"`

*g:conjure#filetype#sql*
`g:conjure#filetype#sql`
Client to use for `SQL` buffers.
Expand Down Expand Up @@ -986,6 +998,7 @@ documentation below or through the `:help conjure-client-*` command. You can
install more clients through 3rd party plugins or simply write your own within
your dotfiles.

- |conjure-client-elixir-stdio|
- |conjure-client-fennel-aniseed|
- |conjure-client-fennel-stdio|
- |conjure-client-clojure-nrepl|
Expand Down
Loading