A Mix (Elixir) wrapper for Neovim.
This plugin adds a :Mix (or just :M), which calls any arbitrary Mix command.
If you know how to use Mix at the command line, you know how to use :Mix.
It's vaguely akin to :!mix but with some improvements:
- Autocompletion for available Mix commands inside the current repository.
- Choose the type of window you want to show the output (WiP).
- Support Telescope integration to navigate through package's documentation (WiP).
- Run async commands inside Neovim (WiP).
This section should guide you to run your first Mix command with :Mix.
Neovim 0.7 or higher is required for mix.nvim to work.
- hrsh7th/cmp-cmdline to enable smooth auto completion.
Using packer.nvim
use { 'brendalf/mix.nvim', requires = { "nvim-lua/plenary.nvim" } }Using vim-plug
Plug 'nvim-lua/plenary.nvim'
Plug 'brendalf/mix.nvim'Using dein
call dein#add('nvim-lua/plenary.nvim')
call dein#add('brendalf/mix.nvim')After installing, you need to initialize mix.nvim with the setup function.
For example:
require("mix").setup()The basic usage is :Mix <command><cr>.
Type :Mix help to see if mix.nvim is installed correctly.
If you have hrsh7th/cmp-cmdline installed:
- Type
:Mixand pressspaceto see the available Mix commands (this could take a couple seconds in the first run). - With the commands loaded you can start typing to get a smooth auto complete experience.
If you are using neovim (or lunarvim) without any cmd plugin:
- Type
:Mix, pressspace, and then presstabto see the available Mix commands. - Use
tabto cycle through the commands or type the whole command wording.
As mentioned above, loading the list of commands in the first time can take some time, because mix.nvim is actually reading them from the output of mix help.
To enable a smooth experience, we save the list of commands internally after the initial loading.
To update the cache, you can call :MixRefreshCompletions.
All contributions are welcome! Just open a pull request.
Please look at the Issues page to see the current backlog, suggestions, and bugs to work.
Distributed under the same terms as Neovim itself.
