INFO: The Alchemist-Server is in Beta status and the API will most likey change until the first release. Feedback and critic are highly appreciated though.
The Alchemist-Server operates as an informant for a specific desired Elixir Mix project and serves with informations as the following:
- Completion for Modules and functions.
- Documentation lookup for Modules and functions.
- Code evaluation and quoted representation of code.
- Definition lookup of code.
- Listing of all available Mix tasks.
- Listing of all available Modules with documentation.
The server needs to be started inside an Elixir mix project like below:
$ cd elixir_project
$ elixir path/to/alchemist-server/run.exs dev
Alchemist-Server (0.7.0) - press Ctrl+C to exit
The Alchemist-Server API is STDIN/STDOUT based, when input sent to a running server process it responds by sending information back to the STDOUT.
A request consisting of two parts, the request type and the request arguments.
Example for a completion request:
[type] [arguments]
COMPLETE { "def", [ context: Elixir, imports: [Enum], aliases: [{MyList, List}] ] }
Return a completion list of all the available candidates.
COMPLETE
COMPLETE { "def", [ context: Elixir, imports: [], aliases: [] ] }
COMPLETE { "List.fla", [ context: Elixir, imports: [], aliases: [] ] }
Return the documentation.
DOC { "defmodule", [ context: Elixir, imports: [], aliases: [] ] }
DOC { "List.flatten/1", [ context: Elixir, imports: [], aliases: [] ] }
Return the evaluation result of the code from the file.
EVAL path/to/file/which/holds/content/to/eval.tmp
Return the code from the file quoted.
QUOTE path/to/file/which/holds/content/to/quote.tmp
Return the path to the source file which holds the definition.
SOURCE { "List,flatten", [ context: [], imports: [], aliases: [] ] }
SOURCE { "nil,defmacro", [ context: [], imports: [], aliases: [] ] }
SOURCE { "String,nil", [ context: [], imports: [], aliases: [] ] }
Return a list of all available mix tasks.
MIXTASKS
Return a list of all available modules which has documentation.
MODULES