ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - dm1try/ilexir: Elixir + Neovim = :couple:
Elixir + Neovim = :couple:. Contribute to dm1try/ilexir development by creating an account on GitHub.
Visit Site

GitHub - dm1try/ilexir: Elixir + Neovim = :couple:

GitHub - dm1try/ilexir: Elixir + Neovim = :couple:

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:

  • IlexirStartApp /path/to/app - runs a hosted app in the specified directory.
  • IlexirStartInWorkingDir - the shortcut for running in current working directory.
    Available options:
    • env - app enviroment (default "dev")
    • script - start script for mix apps (default "app.start")

IlexirStartInWorkingDir --env dev --script phoenix.server

  • IlexirOpenIex - opens IEx for a running app.
  • IlexirEval - evals selected lines.

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

  • "smart" omni completion

autocomplete

  • "on-the-fly" linters
  • ast (it validates the AST:) it's only usefull if autocompilation is disabled)
  • compiler (compiler errors and warnings must be fixed ASAP)
  • xref (it validates the runtime code for unreachable module/functions)

linters

  • app integration
  • multiple applications support (with different enviroments)
  • iex shell (stdio is piped to a separated buffer)

apps

  • "live" evaluation

eval

  • jump to definition

  • open online documentation

  • for elixir packages using hexdocs.pm (respects the package version)

  • for Elixir core (also respects the version)

  • for erlang stdlib (does not respect OTP version, opens docs for the latest release)

  • core components are editor agnostic

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

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory