• Stars
    star
    103
  • Rank 322,261 (Top 7 %)
  • Language
    Vim Script
  • Created over 8 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vim Completion/Doc/Eval for Elixir (nvim), compile https://github.com/awetzel/neovim-elixir and https://github.com/awetzel/nvim-rplugin

elixir.nvim with real contextual completion and doc

NVim plugin for Elixir.

Thanks to the neovim host plugin: https://github.com/awetzel/neovim-elixir, you can develop your own vim plugin in Elixir !

The https://github.com/awetzel/nvim-rplugin project is a vim plugin in Elixir, containing vim functions and commands for documentation, elixir evaluation and completion.

This Vim plugin packages both to give you a nice development environment for Elixir in nvim.

screencast

Features

  • Omni completion with doc
  • Elixir documentation of modules and functions with colors with vim-ref (and K binding)
  • Interpret the currently selected Elixir Code with :ElixirExec
  • If no line selected, then the whole file is interpreted, useful to dynamically reload current file modules when the app runs with :MixStart
  • Bindings are kept along interpretations
  • You can reset binding using the bang: :ElixirExec!
  • Load nearest mix project in current file path with :MixLoad
  • Start the current mix project application inside your vim: :MixStart
  • Deoplete source file for async completion (https://github.com/Shougo/deoplete.nvim)
  • The command :ElixirQuickBuild parses the current buffer to maintain a map of line-> __ENV__, after a call, the completion and documentation will be aware of the context (aliases, imports, use).
  • The :ElixirQuickBuild background compilation can trigger error highlighting and log into vim to help your debugging.

Installation

Just copy this repository into your vim config directory and run install.sh to install both Elixir host for neovim and the elixir plugin.

After installation, run :UpdateRemotePlugins inside your neovim, then restart it to add then Elixir functions and commands to vim.

This package has two dependencies but optional: the official vim-elixir for syntax and indent and vim-ref for doc.

Plug 'elixir-lang/vim-elixir'
Plug 'thinca/vim-ref'
Plug 'awetzel/elixir.nvim', { 'do': 'yes \| ./install.sh' }

Configuration

Two possible configurations are available for the completion function:

  • g:elixir_maxmenu is an integer giving the max length of the function doc preview in omni completion, default to 70
  • g:elixir_docpreview is a boolean (int 0 or 1) to choose if you want the completion function to open doc in preview window or not, default to 0.
  • g:elixir_showerror is a boolean (int 0 or 1) to choose if you want to highlight the errorneous line and log the error into vim during :ElixirQuickBuild compilation. Default to 0.
  • g:elixir_autobuild is a boolean (int 0 or 1) to choose if you want to automatically launch the environment compilation (:ElixirQuickBuild) when you leave insert mode or when you save your file. Default to 0.
  • g:elixir_comp_minlen is an integer giving the minimum string length to complete by the omnicomp function, useful to avoid long time synchronious completion, default to 0
  • g:elixir_maxpreviews is an integer giving the maximum number of completion "words" where the inlined preview is shown, useful to avoid slow completion rendering, default to 100

More Repositories

1

reaxt

Use React template into your Elixir application for server rendering
Elixir
372
star
2

sweet_xml

Elixir
356
star
3

ewebmachine

The HTTP decision tree as a plug (full elixir rewriting of basho/webmachine with improvements)
CSS
97
star
4

exos

Exos is a simple Port Wrapper : a GenServer which forwards cast and call to a linked Port.
Elixir
77
star
5

node_erlastic

Node library to make nodejs gen_server in Erlang/Elixir through Port connection
JavaScript
74
star
6

neovim-elixir

Neovim host plugin for Elixir (use https://github.com/awetzel/elixir.nvim for a packaged version)
Elixir
69
star
7

gitex

Elixir implementation of the Git object storage, but with the goal to implement the same semantic with other storage and topics
Elixir
68
star
8

mailibex

Library containing Email related implementations in Elixir : dkim, spf, dmark, mimemail, smtp
Elixir
60
star
9

nano_ring

NanoRing is a very very small Cluster management System in Elixir.
Elixir
35
star
10

clojure-erlastic

Micro lib making use of erlang JInterface lib to decode and encode Binary Erlang Term and simple erlang port interface with core.async channel. So you can communicate with erlang coroutine with clojure abstraction
Clojure
33
star
11

reaxt-example

An example and test application for "reaxt", the react integration for elixir
JavaScript
30
star
12

delayed_otp

Delay death of supervisor children or gen_server : for instance Erlang supervisor with exponential backoff restart strategy
Elixir
24
star
13

plug_forwarded_peer

Very simple plug which reads `X-Forwarded-For` or `Forwarded` header according to rfc7239 and fill `conn.remote_ip` with the root client ip.
Elixir
24
star
14

supervisorring

otp/supervisor-like interface to supervise distributed processes
Elixir
16
star
15

adap

Create a data stream across your information systems to query, augment and transform data according to Elixir matching rules.
Elixir
16
star
16

calibex

Elixir ICal : bijective coding/decoding for ICal transformation, ICal email request and responses.
Elixir
15
star
17

rulex

This tiny library (2 macros only) allows you to define very simple rule handler using Elixir pattern matching.
Elixir
13
star
18

exfsm

Simple elixir library to define a static FSM.
Elixir
11
star
19

nvim-rplugin

Nvim Elixir plugin with autocompletion and eval commands
Elixir
9
star
20

dotx

Dotx is a library for DOT file parsing and generation. The whole spec https://www.graphviz.org/doc/info/lang.html is implemented.
Elixir
9
star
21

json_stream

Small but useful wrapper above erlang `jsx` to stream json elements from an Elixir binary stream.
Elixir
8
star
22

stemex

Stemex is a NIF wrapper above the snowball language (http://snowball.tartarus.org)
C
7
star
23

zip_stream

Library to read zip file in a stream. Zip file binary stream -> stream of {:new_file,name} or uncompressed_bin Erlang zlib library only allows deflate decompress stream. But Erlang zip library does not allow content streaming.
HTML
7
star
24

nox

Node / npm wrapper
Elixir
5
star
25

babel-plugin-transform-jsxz

Write your JSX for your HTML components using successive transformations targeted with CSS selector at compilation time - in the same way that enlive templates work. As a Babel transform plugin.
JavaScript
4
star
26

bert_view

Chrome Extension to have a pretty view of binary erlang term in HTTP service
JavaScript
2
star
27

arcore

Arcore OS, the very simple Kbrw Immutable OS - linux distribution based on Systemd and Runc.
Shell
2
star
28

jsxz-loader

JSXZ Loader allows you to Precompile your JSX HTML components from static HTML templates using CSS selectors.
JavaScript
1
star
29

elixir-sandbox

Elixir
1
star
30

qrcode

Erlang
1
star