Home

Awesome

Ilexir Build Status

Requirements

Windows platform is not supported.

Install

  1. Add the plugin to vim runtime.

vim-plug example: Plug 'dm1try/ilexir'

  1. Run UpdateElixirPlugins command.
  2. Restart the editor.

Usage

On the way: Take a look at this asciinema demo for a quick start.

Common commands:

IlexirStartInWorkingDir --env dev --script phoenix.server

Editor settings

ilexir_autocompile - 1(default) or 0, enable/disable auto compiling. The file can be compiled manually by IlexirCompile command. See the architecture section for details.

Changes for this var are applied in runtime :let ilexir_autocompile = 0

Features

autocomplete

linters

apps

eval

Development

Architecture

"Hosted" app is your app that is bootstrapped with bunch of hosted components. The app is running on remote erlang node.

In case you are playing around with a simple script outside of any app,
it will be just a node with running elixir on it. See the demo above.

The hosted components work inside your running app enviroment, so they can inspect the app and provide the data on demand to "editor-specific" components. They talk to each other through :rpc module.

                             +                 +---------------------+
                             |             +--->  HOSTED COMPONENTS  +--------+
                             |             |   +---------------------+        |
      nvim + elixir host     |             |      |  compiler     |           |
                             |             |      +---------------+           |
  +----------------------+   |             |      |  linters      |           |
  |           |          |   |             |      +---------------+           |
  | +-----    | +----+   |   |             |      |  evaluator    |           |
  | |-------+ | +------+ |   |             |      +---------------+           |
  | |----|    |          |   |             |      |  ...          |           |
  | |----|    | +-----+  |   |             |      +---------------+           |
  | |-------+ | |------+ |   |             |                                  |
  | +-------+ | +----+   |   |    +------------------+  rpc  +----------------v-------+
  |           |          |   |    |       CORE       <------->    NODES(app & hosted) |
  +----------------------+   |    +------------------+       +------------------------+
  | +----+               |   |      |  hosted app  |            |  app1.dev        |
  |                      |   |      |   manager    |            +------------------+
  +----------------------+   |      +--------------+            +------------------+
                             |      | nvim specific|            |  app1.test       |
                             |      |  components: |            +------------------+
                             |      | +----------+ |            +------------------+
                             |      | | quickfix | |            |  umbrella1.dev   |
                             |      | +----------+ |            +------------------+
                             |      | | toolwin  | |            +------------------+
                             |      | +----------+ |            |  ...             |
                             |      +--------------+            +------------------+
                             |
                             +


Elixir core building blocks(def/defmodule/alias/use/import) are macros that are applied directly to AST so the provided solution is "compile-first". The information provided by plugin components will be a more "accurate" if a working file is processed by the Ilexir compiler. The compiler pre-saves(in memory) useful data between compilations(such as ENV module struct) and also notifies other components during/after the compilation that they can handle the data for their own needs.

Setup locally

Clone the repo and add it to neovim runtime.

vim-plug example: Plug '/home/user/Projects/ilexir'

ElixirHostLog and ElixirReloadScript are useful Elixir host commands for a playing with local changes.

Testing

Run tests: mix espec

Writing components

Coming soon